Package com.zfabrik.components.provider.fs

## Class FileSystemImpl

- java.lang.Object
- - com.zfabrik.components.provider.fs.FileSystemImpl

- All Implemented Interfaces:
    `IAbstractFileSystem`

      public class FileSystemImpl
      extends java.lang.Object
      implements IAbstractFileSystem

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `FileSystemImpl​(java.io.File root)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `exists​(java.lang.String name)` | Check whether a file exists.
    `java.io.InputStream` | `getInputStream​(java.lang.String name)` | Retrieve the named resource as InputStream
    `java.io.File` | `getRoot()` | Returns the root folder
    `java.util.Iterator<AbstractFile>` | `iterate​(java.lang.String name, int depth)` | Iterate over files under another file, i.e.
    `java.util.List<AbstractFile>` | `list​(java.lang.String name, int depth)` | list files under another file, i.e.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileSystemImpl

          public FileSystemImpl​(java.io.File root)

  - ### Method Detail

    - #### getRoot

          public java.io.File getRoot()

      Description copied from interface: `IAbstractFileSystem`
      Returns the root folder
      Specified by:
        `getRoot` in interface `IAbstractFileSystem`
      Returns:
        Root folder

    - #### exists

          public boolean exists​(java.lang.String name)
                         throws java.io.IOException

      Description copied from interface: `IAbstractFileSystem`
      Check whether a file exists.
      Specified by:
        `exists` in interface `IAbstractFileSystem`
      Returns:
        `true` if the named file exists, `false` otherwise.
      Throws:
        `java.io.IOException`

    - #### getInputStream

          public java.io.InputStream getInputStream​(java.lang.String name)
                                             throws java.io.IOException

      Description copied from interface: `IAbstractFileSystem`
      Retrieve the named resource as InputStream
      Specified by:
        `getInputStream` in interface `IAbstractFileSystem`
      Throws:
        `java.io.IOException`

    - #### list

          public java.util.List<AbstractFile> list​(java.lang.String name,
                                                   int depth)
                                            throws java.io.IOException

      Description copied from interface: `IAbstractFileSystem`
      list files under another file, i.e. a folder. The first result element is the named file as specified by the signature.
      Specified by:
        `list` in interface `IAbstractFileSystem`
      Throws:
        `java.io.IOException`

    - #### iterate

          public java.util.Iterator<AbstractFile> iterate​(java.lang.String name,
                                                          int depth)
                                                   throws java.io.IOException

      Description copied from interface: `IAbstractFileSystem`
      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.
      Specified by:
        `iterate` in interface `IAbstractFileSystem`
      Throws:
        `java.io.IOException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`