John-Philippe Verger wrote:But I don't understand why f.listFiles() is null, since my partition C:\ has lot of physical files and directories in it.
I don't see any code which prints "C:\", so I don't know where that is coming from
An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname. The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.