Files and FileDescriptors

Back Up Next

 

Files and FileDescriptors
FileDescriptors are representations of low-level file-handles and sockets.  You cannot "create" your own FileDescriptor and have it make sense.  Useful for socket and low-level IO programming via JNI to communicate with C code.
Files enable you to do a whole host of actions on the local file system (those that security permit you to), including:
Creating, deleting, renaming files and creating temporary (uniquely named) files
Testing for file existence and reading its length
Reading and setting file/directory attributes such as readable, writable, hidden and modification time
Getting the absolute, relative, and canonical (system dependent) file path/name
Listing and creating directories