EntityFS programmer's guide

Revision History
Revision 1.1.12009-03-16

Table of Contents

1. Introduction
Please help!
License and Copyright
2. Getting started
Downloading EntityFS
Installing EntityFS
Running unit tests (optional)
Running performance tests (optional)
3. What is a file, anyway?
4. File systems
Creating a file system
Tuning file system parameters
Closing a file system
5. Entities
Entity locations
Directory views
6. Design principles
Exceptions and error handling
7. Locking and multi-threaded access
Locking strategies
Lock commands
Custom locks
Interrupting threads
8. Utility classes
Entity utility classes
Recursive iterators
Iterator utilities
Entity filters
Property utilities
Input and output stream implementations
Other utility classes
9. Entity events
Polling observable
10. Capabilities
11. Metadata support
12. Entity attributes
Unix attributes
NTFS attributes
Custom attributes
13. Access controls
The access granter access controller
The Unix entity mode access controller
14. Zip and Jar files
Zip file systems
Building Zip files
Building Jar files
Reading from Zip and Jar files
A. Java IO to EntityFS and back again
From File to entity
From entity to File

List of Figures

5.1. Simplified inheritance chart for entity objects

List of Tables

3.1. Important ReadableFile implementations
3.2. ReadableFile adapters
3.3. Important NamedReadableFile implementations
3.4. NamedReadableFile adapters
3.5. Important WritableFile implementations
3.6. WritableFile adapters
3.7. Important RandomlyAccessibleFile implementations
3.8. RandomlyAccessibleFile adapters
3.9. ReadWritableFile adapters
3.10. Important EntityHolder implementations
3.11. Important EntityListable implementations
3.12. Important EntityRepository implementations
4.1. File system implementations
7.1. Lock types
7.2. Lock acquiring strategies
7.3. Lock commands
8.1. Entity utility classes
8.2. Recursive iterators
8.3. Iterator utilities
8.4. Entity filters
8.5. Adapter implementations
8.6. InputStream implementations
8.7. OutputStream implementations
8.8. RandomAccess implementations
8.9. Other utility classes
9.1. EntityEvent types
10.1. Entity capabilities
10.2. File system capabilities
10.3. Capability providers
11.1. Metadata capability providers
A.1. File adapters

List of Examples

4.1. Creating a file system-backed file system
4.2. Creating a Jar file-backed file system on a file in another file system
5.1. Moving an entity in a locking file system
5.2. Moving an entity using utility methods
5.3. Creating a file in the root directory
5.4. Creating a file in the root directory using Directories
5.5. Getting an entity in a subdirectory
5.6. Listing entities in a directory
5.7. Listing entities in a directory using Directories
5.8. A directory view
5.9. Using a Directory directly in a for loop
5.10. Using a DirectoryView directly in a for loop
5.11. Using a depth-first iterator
5.12. Views settings are inherited
5.13. Creating and opening a file
5.14. Creating and writing to a text file
5.15. Using a lock-aware stream
7.1. Using try-finally for locks
7.2. Releasing several locks in finally
7.3. Using a LockCommandExecutor
8.1. Creating a new file
8.2. Holding a write lock for several utility method calls
8.3. Simple IteratorDeleter implementation
8.4. An iterator for iterating recursively over XML files
8.5. Working with properties
8.6. Synchronizing directory hierarchies
9.1. Registering an observer on a directory
9.2. Adding a file to a directory
9.3. Modifying a file
9.4. Moving an entity
9.5. Using a polling directory monitorer to watch for incoming XML files
10.1. Using Unix entity attributes to get an entity's creation time
10.2. Using Unix entity attributes utility class to get an entity's creation time
10.3. Creating a Ram file system with gzip compression of file data
11.1. Creating a metadata enabled file system
11.2. Creating a file system with metadata support for directories
11.3. Setting a metadata property on an entity
11.4. Reading data from a named metadata file
12.1. Using the custom entity attributes capability
13.1. A custom access granter
13.2. The Unix entity mode access controller on a non-locking file system
13.3. The Unix entity mode access controller on a locking file system
14.1. Building a Zip file
14.2. Building a Zip file from files in two directory hierarchies
14.3. Building a Jar file
14.4. Reading entities from a Zip file
14.5. Unzipping a Zip file
A.1. Creating a custom file system on the File
A.2. Creating a file system on the File using a FileSystems method
A.3. Getting an existing Entity using a FSCFileResolvableUtil method
A.4. Adapting a File to the ReadableFile interface
A.5. Getting a File object referencing an entity