Package hec.io
Class SimpleFileOpenerImpl
java.lang.Object
hec.io.SimpleFileOpenerImpl
- 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.boolean
lockFile
(Identifier id, FileLock flock) openFile
(Identifier fileToOpenId, boolean useCache) Opens the file specified by fileToOpenId.boolean
unlockFile
(Identifier id, FileLock flock)
-
Constructor Details
-
SimpleFileOpenerImpl
public SimpleFileOpenerImpl()
-
-
Method Details
-
openFile
Description copied from interface:FileOpener
Opens the file specified by fileToOpenId.- Specified by:
openFile
in 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.HecFile
attached or null if the file doesn't exist
-
createFile
Description copied from interface:FileOpener
Creates the file specified by fileToCreateId. If the file exists it is not opened.- Specified by:
createFile
in interfaceFileOpener
- Parameters:
fileToCreateId
- the file to open- Returns:
- An Identifier with a
hec.io.HecFile
attached or null if the file exists
-
lockFile
- Specified by:
lockFile
in interfaceFileOpener
- Returns:
-
unlockFile
- Specified by:
unlockFile
in interfaceFileOpener
- Returns:
-
getFileList
Description copied from interface:FileOpener
Return a List of files in the directory path that matches the filter filter.- Specified by:
getFileList
in 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:FileOpener
return a List of drives on the machine- Specified by:
getDriveList
in interfaceFileOpener
-