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 Details

    • getRoot

      File getRoot()
      Returns the root folder
      Returns:
      Root folder
    • exists

      boolean exists(String name) throws IOException
      Check whether a file exists.
      Parameters:
      name -
      Returns:
      true if the named file exists, false otherwise.
      Throws:
      IOException
    • getInputStream

      InputStream getInputStream(String name) throws IOException
      Retrieve the named resource as InputStream
      Throws:
      IOException
    • list

      List<AbstractFile> list(String name, int depth) throws IOException
      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

      Iterator<AbstractFile> iterate(String name, int depth) throws IOException
      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