java.lang.Object
org.cryptomator.frontend.fuse.OpenFileFactory
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes all currently open files.voidclose(long fileHandle) Closes the channel identified by the given fileHandlelongopen(Path path, OpenOption... options) longopen(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
-
Constructor Details
-
OpenFileFactory
public OpenFileFactory()
-
-
Method Details
-
open
- Parameters:
path- path of the file to openoptions- file open options- Returns:
- file handle used to identify and close open files.
- Throws:
IOException
-
open
public long open(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException - Parameters:
path- path of the file to openoptions- file open optionsattrs- file attributes to set when opening- Returns:
- file handle used to identify and close open files.
- Throws:
IOException
-
get
-
close
Closes the channel identified by the given fileHandle- Parameters:
fileHandle- file handle used to identify- Throws:
ClosedChannelException- If no channel for the given fileHandle has been found.IOException
-
close
Closes all currently open files. Calling this method will not prevent the factory to open new files, i.e. this method can be called multiple times and is not idempotent.- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-