Android /config 目录列出了 .exists() == false 的文件?

发布于 2024-11-07 02:09:23 字数 173 浏览 3 评论 0原文

我的 Android 2.2.2 文件系统显示 /config 包含lost+found、public 和 wifi。但是,任何这些路径的 new File() 上的 .exists() 都会返回 false。这是 Android 中的错误,还是我的理解?我没有看到任何用于检查特殊文件的文件方法..也许我在其他地方错过了一些东西?

My Android 2.2.2 file system shows a /config containing lost+found, public, and wifi. However, .exists() on a new File() for any of those paths returns false. Is this a bug in Android, or in my understanding? I don't see any File methods for checking for special files.. maybe I missed something elsewhere?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萝莉病 2024-11-14 02:09:23

只有 root 可以列出 /config 文件夹中的文件。您的应用程序无权读取此文件夹中的内容并获取文件列表。

C:/Users/inazaruk> adb shell
$ ls -l /

dr-x------ root     root              2011-05-12 20:30 config
drwxrwx--- system   cache             2011-05-12 23:35 cache
....

Only root can list files in /config folder. Your application don't have permissions to read content and get list of files from this folder.

C:/Users/inazaruk> adb shell
$ ls -l /

dr-x------ root     root              2011-05-12 20:30 config
drwxrwx--- system   cache             2011-05-12 23:35 cache
....
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文