ERXFileRepository Class Reference
List of all members.
Detailed Description
Allows you to store a large amount of files and folders without the hassles of directory size limitations. The files are stored by an abstract "key" which is by default a
ERXRandomGUID.
It uses a factory to create the folder structure under the root directory. With the default factory there will be directories for the first two characters and under these again directories for the next two characters of the GUID.
- Author:
- ak (original version by Dominik Westner)
Constructor & Destructor Documentation
Private constructor, as we use the factory methods to create instances.
- Parameters:
-
Member Function Documentation
Adds an existing repository under the given name.
- Parameters:
-
| name | the name under which the repository should be added |
| repository | the repository to register |
- Returns:
- the repository
Adds a repository under the given name and the given root directory that uses the given factory.
- Parameters:
-
| name | the name under which the repository should be added |
| root | the root directory of the repository |
| factory | the factory to determine the directory from the id for this repository |
- Returns:
- the new repository
Adds a repository under the given name and the given root directory that uses the default factory.
- Parameters:
-
| name | the name under which the repository should be added |
| root | the root directory of the repository |
- Returns:
- the new repository
Returns a new file in the repository. As you can also create directories it does not really create the file, only the path to the file. You can use file.getName() to get at the GUID which is the key to the file.
- Returns:
- the new file
Returns a file for a given id
- Parameters:
-
- Returns:
- a file for the given id
Returns the root directory for the repository.
- Returns:
- the root directory for the repository
Returns true if the file is present in the repository and also exists.
- Parameters:
-
- Returns:
- true if the file exists in the repository
Returns the repository that is registered under the given name.
- Parameters:
-
| name | the name under which the respository is registered |
- Returns:
- the repository that is registered under the given name or null
Member Data Documentation
The documentation for this class was generated from the following file: