Package com.bc.ceres.metadata
Class DefaultSimpleFileSystem
java.lang.Object
com.bc.ceres.metadata.DefaultSimpleFileSystem
- All Implemented Interfaces:
SimpleFileSystem
An implementation of the
SimpleFileSystem interface relying on File.- Since:
- Ceres 0.13.2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReader(String path) Returns a reader for the given path.createWriter(String path) Returns a writer for the given path.booleanChecks, if the given path is a file or not (then e.g.String[]Lists all elements inside the given directory path.
-
Constructor Details
-
DefaultSimpleFileSystem
public DefaultSimpleFileSystem()
-
-
Method Details
-
createReader
Description copied from interface:SimpleFileSystemReturns a reader for the given path.- Specified by:
createReaderin interfaceSimpleFileSystem- Parameters:
path- The path in the filesystem- Returns:
- a reader instance
- Throws:
IOException- If an I/O error occurs
-
createWriter
Description copied from interface:SimpleFileSystemReturns a writer for the given path.- Specified by:
createWriterin interfaceSimpleFileSystem- Parameters:
path- The path in the filesystem- Returns:
- a writer instance
- Throws:
IOException- If an I/O error occurs
-
list
Description copied from interface:SimpleFileSystemLists all elements inside the given directory path.- Specified by:
listin interfaceSimpleFileSystem- Parameters:
path- The path in the filesystem- Returns:
- An array of strings naming the files and directories in the
directory denoted by this directory path. The array will be
empty if the directory is empty. Returns
nullif this path does not denote a directory. - Throws:
IOException- If an I/O error occurs
-
isFile
Description copied from interface:SimpleFileSystemChecks, if the given path is a file or not (then e.g. a directory)- Specified by:
isFilein interfaceSimpleFileSystem- Parameters:
path- to a file or directory- Returns:
- true, if given path is a file on the fs
-