Obtaining a FileSystem Instance
You have the option to use the convenience method CryptoFileSystemProvider#newFileSystem as follows:
FileSystem fileSystem = CryptoFileSystemProvider.newFileSystem(
storageLocation,
CryptoFileSystemProperties.cryptoFileSystemProperties()
.withPassphrase("password")
.withFlags(FileSystemFlags.READONLY) // readonly flag is optional of course
.build());
or to use one of the standard methods from FileSystems#newFileSystem:
URI uri = CryptoFileSystemUri.create(storageLocation);
FileSystem fileSystem = FileSystems.newFileSystem(
uri,
CryptoFileSystemProperties.cryptoFileSystemProperties()
.withPassphrase("password")
.withFlags(FileSystemFlags.READONLY) // readonly flag is optional of course
.build());
do not work, since class org.cryptomator.cryptofs.CryptoFileSystemProperties.Builder has no method withPassphrase(java.lang.String)
The usage examples in the readme:
do not work, since
class org.cryptomator.cryptofs.CryptoFileSystemProperties.Builder
has nomethod withPassphrase(java.lang.String)