Interface IAbstractFileSystem
- All Known Implementing Classes:
FileSystemImpl
public interface IAbstractFileSystem
A very basic abstraction of what a component storage does (whether local or remote) as
far as a component repository is concerned.
Implementations of this interface serve to hold components and component resources
organized in a folder style structure where the root level contains modules
(or projects) and the second level contains component folders containing a
properties file resource z.properties
or direct component definitions
in the form of .properties
file resources.
File resources are provided via instances of AbstractFile
.
All names for files are absolute. Paths do not start with "/" but paths are separated by "/". The root folder is hence named "", rather than "/"
- Author:
- hb
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check whether a file exists.getInputStream
(String name) Retrieve the named resource as InputStreamgetRoot()
Returns the root folderIterate over files under another file, i.e.list files under another file, i.e.
-
Method Details
-
getRoot
File getRoot()Returns the root folder- Returns:
- Root folder
-
exists
Check whether a file exists.- Parameters:
name
-- Returns:
true
if the named file exists,false
otherwise.- Throws:
IOException
-
getInputStream
Retrieve the named resource as InputStream- Throws:
IOException
-
list
list files under another file, i.e. a folder. The first result element is the named file as specified by the signature.- Throws:
IOException
-
iterate
Iterate over files under another file, i.e. a folder. The first result element is the named file as specified by the signature. When working over large sets of files this method should realize the advantage that it does not require to read everything in advance, saving memory and time.- Throws:
IOException
-