Represents a file, and is used to access the content and structure of the file.
Files are arranged in a hierarchy. Each hierachy forms a file system. A file system represents things like a local OS file system, a windows share, an HTTP server, or the contents of a Zip file.
There are two types of files: Folders, which contain other files, and normal files, which contain data, or content. A folder may not have any content, and a normal file cannot contain other files.
File Naming
TODO - write this.
Reading and Writing a File
Reading and writing a file, and all other operations on the file's content, is done using the {@link FileContent} object returnedby {@link #getContent}.
Creating and Deleting a File
A file is created using either {@link #createFolder}, {@link #createFile}, or by writing to the file using one of the {@link FileContent} methods.
A file is deleted using {@link #delete}. Recursive deletion can be done using {@link #delete(FileSelector)}.
Finding Files
Other files in the same file system as this file can be found using:
- {@link #resolveFile} to find another file relative to this file.
- {@link #getChildren} and {@link #getChild} to find the children of this file.
- {@link #getParent} to find the folder containing this file.
- {@link #getFileSystem} to find another file in the same file system.
To find files in another file system, use a {@link FileSystemManager}.
@author Adam Murdoch
@see FileSystemManager
@see FileContent
@see FileName