The list() method returns an array of Strings initialized to the names of each file in a directory. It is useful for processing all the files in a directory.
There's also an alternative version of list() that is the same as the previous method except you can use a FilenameFilter object to restrict which files are included in the list.
The alternative version of list() uses a FilenameFilter object to restrict which files are included in the list:
The two list() methods return arrays of strings and the strings contain the names of files.
You can use these to construct File objects. Java 2 allows you to eliminate the intermediate step of creating File objects by providing two listFiles() methods that return arrays of File objects instead of arrays of strings.
File URLs are used inside web browsers to refer to a file on the local hard drive. They have the basic form:
<host> should be the fully qualified domain name of the system on which the is found, though if it is omitted, the local host is assumed.
<path> is the hierarchical path to the file, using a forward slash as a directory separator (regardless of host filename conventions) and URL encoding of any special characters in
filenames that would normally be encoded in a URL. Examples of file URLs include: