Nexus 7, Android 4.3: Same directory, two canonical paths

爱⌒轻易说出口 提交于 2019-12-10 13:40:04

问题


I'm using a Nexus 7 running Android 4.3. Two directory paths on this device are confusing me:

/storage/emulated/legacy
/storage/emulated/0

If I call new File(<path>).getCanonicalPath() for either of these, I get the same path back. If I call the C function realpath with either, it succeeds and returns the same path. So it sounds like each of these is its own canonical path, and therefore they are different directories.

However, If I create a subdirectory in either one, that subdirectory also appears in the other. That gives me the impression that they are two paths to the same directory.

Is there a better way to tell that these paths are really for the same directory?

来源:https://stackoverflow.com/questions/19069088/nexus-7-android-4-3-same-directory-two-canonical-paths

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!