Class VfsDataFile

java.lang.Object
org.fastnate.data.files.VfsDataFile
All Implemented Interfaces:
DataFile

public class VfsDataFile extends Object implements DataFile
Represents a file from the class path. Wraps a Vfs.File.
Author:
Tobias Liefke
  • Constructor Details

    • VfsDataFile

      public VfsDataFile(VfsDataFolder parent, org.reflections.vfs.Vfs.File file)
      Creates a new VfsDataFile instance.
      Parameters:
      parent - The parent directory.
      file - The file that is wrapped by this DataFile.
  • Method Details

    • getFolder

      public DataFolder getFolder()
      Description copied from interface: DataFile
      The folder that contains this file.
      Specified by:
      getFolder in interface DataFile
      Returns:
      the folder
    • getName

      public String getName()
      Description copied from interface: DataFile
      The name of this file.
      Specified by:
      getName in interface DataFile
      Returns:
      the name of this file
    • open

      public InputStream open() throws IOException
      Description copied from interface: DataFile
      Opens this file for input. The caller is responsible to close the stream.
      Specified by:
      open in interface DataFile
      Returns:
      the input stream of this file
      Throws:
      IOException - if the file is not accessible