cryptomator / cryptofs

Java Filesystem Provider with integrated encryption
GNU Affero General Public License v3.0
93 stars 35 forks source link

documentation is out of date #157

Closed glennhartmann closed 1 year ago

glennhartmann commented 1 year ago

The usage examples in the readme:

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)

infeo commented 1 year ago

Thanks for letting us know. I finally updated the documentation.