Interface FileOpener

All Known Subinterfaces:
MapWorkspace, Workspace
All Known Implementing Classes:
SimpleFileOpenerImpl, SimpleFileOpeners

public interface FileOpener
  • Method Details

    • openFile

      Identifier openFile(Identifier fileToOpenId, boolean useCache)
      Opens the file specified by fileToOpenId.
      Parameters:
      fileToOpenId - the file to open
      useCache - true if the file should be downloaded to the cache directory and then read
      Returns:
      An Identifier with a hec.io.HecFile attached or null if the file doesn't exist
    • createFile

      Identifier createFile(Identifier fileToCreateId)
      Creates the file specified by fileToCreateId. If the file exists it is not opened.
      Parameters:
      fileToCreateId - the file to open
      Returns:
      An Identifier with a hec.io.HecFile attached or null if the file exists
    • lockFile

      boolean lockFile(Identifier id, FileLock flock)
      Parameters:
      id -
      flock -
      Returns:
    • unlockFile

      boolean unlockFile(Identifier id, FileLock flock)
      Parameters:
      id -
      flock -
      Returns:
    • getFileList

      List getFileList(String path, String filter)
      Return a List of files in the directory path that matches the filter filter.
      Parameters:
      path - the directory to get the List of files from
      filter - the file name filter
      Returns:
      A List of files in the directory path that match filter
    • getDriveList

      List getDriveList()
      return a List of drives on the machine