Given the absolute path as a variable String pathname, how can I do the following using the Java Class File? The answers as far as I know are in parenthesis, please confirm.
get the size of the file/directory? (I'm not sure)
test if the absolute path even leads to something that exists? (File.exists(pathname), which should return a boolean true if it exists, boolean false otherwise)
see if this is this a file or directory? (File.isFile(pathname), which returns a boolean true if the pathname leads to a file, false otherwise. file.isDirectory(pathname), which returns a boolean true if the pathname leads to a directory, false otherwise)
see the last date modified? (File.lastModified(pathname), which returns a long number which I already have the method for to convert to a specific date
A related but separate question: is there something that is a "file", like a .doc, .jpeg, .mpeg, .mp3, .xml, .* that will fail both isFile and isDirectory tests? If so, how can I distinguish between an empty folder and a folder with a file that fails both isFile and isDirectory tests? I'm asking because on the File class documentation, it states the following for isFile: Tests whether the file denoted by this abstract pathname is a normal file. A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria. Any non-directory file created by a Java application is guaranteed to be a normal file.