Class FilesystemVFSSource

java.lang.Object
com.tccc.kos.commons.core.vfs.AbstractVFSSource
com.tccc.kos.commons.core.vfs.FilesystemVFSSource
All Implemented Interfaces:
VFSSource

public class FilesystemVFSSource extends AbstractVFSSource
Class that corresponds to a directory on a filesystem. It allows native filesystem files to be mapped into the VFS.
Since:
1.0
Version:
2022-08-30
  • Constructor Details

    • FilesystemVFSSource

      public FilesystemVFSSource(String path)
      Creates a source that maps to the specified root directory.
      Parameters:
      path - the directory corresponding to the root of this source
    • FilesystemVFSSource

      public FilesystemVFSSource(File dir)
      Creates a source that maps to the specified root directory.
      Parameters:
      dir - the directory corresponding to the root of this source
  • Method Details

    • getInputStream

      public InputStream getInputStream(String path)
      Retrieves the input stream for the given path.
      Parameters:
      path - the requested path
      Returns:
      the input stream