listFiles() of File not working on symbolic links?

Posted by Joset on Stack Overflow See other posts from Stack Overflow or by Joset
Published on 2010-03-18T16:57:20Z Indexed on 2010/03/18 17:11 UTC
Read the original article Hit count: 592

Filed under:
|
|
|

I have the following File object pointing to a directory via symbolic link,

File directory = new File("/path/symlink/foo/bar");
String[] files = directory.listFiles();

listFiles() returns null, is this because of the symlink? if yes, how will I go about this if I really want to list the files in bar using the path that contains a symlink?

© Stack Overflow or respective owner

Related posts about java

Related posts about symlink