如何删除应用程序目录中的文件? [英] How can you delete a file in the application directory?

查看:41
本文介绍了如何删除应用程序目录中的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在将日志文件写入 File.applicationDirectory 并希望清除旧的日志文件.问题是如何从该目录中删除文件?当我尝试从这个目录中删除旧的日志文件时,它给出了一个安全异常.反正有这个吗?

We are writing log files to File.applicationDirectory and want to clean out old log files. The question is how do you delete files out of that directory? When I try and delete old log files out of this directory it gives a security exception. Is there anyway around this?

我知道您不应该写入 File.applicationDirectory,但无论如何我们正在写入日志.所以请不要只是说不要那样做!

I know you are not supposed to write to File.applicationDirectory, but we are writting are logs there anyways. So please don't just say don't do that!

谢谢,

瑞恩

推荐答案

File.applicationDirectory 是只读目录.

File.applicationDirectory is a read only directory.

http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html

这篇关于如何删除应用程序目录中的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆