Class CryptoFileSystemProvider

java.lang.Object
java.nio.file.spi.FileSystemProvider
org.cryptomator.cryptofs.CryptoFileSystemProvider

public class CryptoFileSystemProvider extends FileSystemProvider

A FileSystemProvider for CryptoFileSystems.

All FileSystem instances created by CryptoFileSystemProvider are instances of CryptoFileSystem. Usage

It is recommended to use newFileSystem(Path, CryptoFileSystemProperties) to create a CryptoFileSystem. To do this:

 Path storageLocation = Paths.get("/home/cryptobot/vault");
 FileSystem fileSystem = CryptoFileSystemProvider.newFileSystem(
        storageLocation,
    cryptoFileSystemProperties()
                .withPassword("password")
                .withFlags(FileSystemFlags.READONLY)
                .build());
 

Afterwards you can use the created FileSystem to create paths, do directory listings, create files and so on.

To create a new FileSystem from a URI using FileSystems.newFileSystem(URI, Map) you may have a look at CryptoFileSystemUri.

See Also: