Package hec.map.vrt
Class SimpleFileOpeners
java.lang.Object
hec.map.vrt.SimpleFileOpeners
- All Implemented Interfaces:
FileOpener
-
Constructor Summary
Constructors -
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.booleanlockFile(Identifier id, FileLock flock) openFile(Identifier fileToOpenId, boolean useCache) Opens the file specified by fileToOpenId.booleanunlockFile(Identifier id, FileLock flock)
-
Constructor Details
-
SimpleFileOpeners
public SimpleFileOpeners()
-
-
Method Details
-
openFile
Description copied from interface:FileOpenerOpens the file specified by fileToOpenId.- Specified by:
openFilein interfaceFileOpener- 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.HecFileattached or null if the file doesn't exist
-
createFile
Description copied from interface:FileOpenerCreates the file specified by fileToCreateId. If the file exists it is not opened.- Specified by:
createFilein interfaceFileOpener- Parameters:
fileToCreateId- the file to open- Returns:
- An Identifier with a
hec.io.HecFileattached or null if the file exists
-
lockFile
- Specified by:
lockFilein interfaceFileOpener- Returns:
-
unlockFile
- Specified by:
unlockFilein interfaceFileOpener- Returns:
-
getFileList
Description copied from interface:FileOpenerReturn a List of files in the directory path that matches the filter filter.- Specified by:
getFileListin interfaceFileOpener- 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
Description copied from interface:FileOpenerreturn a List of drives on the machine- Specified by:
getDriveListin interfaceFileOpener
-