cryptomator / cryptofs

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

Feature/#103 refactor contains vault #104

Closed infeo closed 3 years ago

infeo commented 3 years ago

Closes #103

As suggested, the (public) enum DirStructure is introduced with a static method to determine how "much" the directory structure resembles a vault.

I think the most important change is that the containsVault(...) method only checks for a vault structure of vault format 8. For a more fine grained result, use the method CryptoFileSystemProvider.checkDirStructureForVault(...).

infeo commented 3 years ago

For useability I would keep the CryptoFileSystemProvider.checkDirStructureForVault(...) method. It just a delegate, but we gather vault structure related functions (initialize, check) at one place.