问题
Are there any files or locations in the Android filesystem that cannot be found using File.listFiles()
, starting at the root (/
) and recursively entering and listing directories found by listFiles
, while ignoring/skipping any SymLinks (Symbolic Links).
Or, to put it another way, can SymLinks point to somewhere in the Android filesystem that cannot be found in the standard file tree?
I am aware there is an emulated file system as part of the overall filesystem, but I had understood that the emulation is transparent to the APIs and at least seemingly part of the overall filesystem. Is that wrong?
Follow up question (that I can put in a separate question if need be): if yes, how can I access those locations to crawl them?
The reason I ask is that following the procedure outlined above, there seem to be some files missing, which is strange as I'd understood Symbolic Links pointed to files and folders that were still present in the file system, but just made them look as if they were elsewhere.
NB: for detecting SymLinks I use isSymLink() from https://svn.apache.org/repos/asf/commons/_moved_to_git/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java adjusted a bit to remove Java 7 and Windows mentions.
NB 2: this is part of my attempt to find a solution to Crawling Android File System gets stuck in possible SymLink loop, so can be seen in that context if needed, and more code can be found there.
来源:https://stackoverflow.com/questions/59606639/android-symlinks-to-hidden-or-separate-locations-or-partitions