Package hec.appInterface
Interface FileOpener
- All Known Subinterfaces:
MapWorkspace
,Workspace
- All Known Implementing Classes:
SimpleFileOpenerImpl
,SimpleFileOpeners
public interface FileOpener
-
Method Summary
Modifier and TypeMethodDescriptioncreateFile
(Identifier fileToCreateId) Creates the file specified by fileToCreateId.return a List of drives on the machinegetFileList
(String path, String filter) Return a List of files in the directory path that matches the filter filter.boolean
lockFile
(Identifier id, FileLock flock) openFile
(Identifier fileToOpenId, boolean useCache) Opens the file specified by fileToOpenId.boolean
unlockFile
(Identifier id, FileLock flock)
-
Method Details
-
openFile
Opens the file specified by fileToOpenId.- Parameters:
fileToOpenId
- the file to openuseCache
- 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
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
- Parameters:
id
-flock
-- Returns:
-
unlockFile
- Parameters:
id
-flock
-- Returns:
-
getFileList
Return a List of files in the directory path that matches the filter filter.- Parameters:
path
- the directory to get the List of files fromfilter
- 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
-