Package org.cryptomator.cryptofs
Class CryptoPathMapper
- java.lang.Object
-
- org.cryptomator.cryptofs.CryptoPathMapper
-
@CryptoFileSystemScoped public class CryptoPathMapper extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCryptoPathMapper.CiphertextDirectory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertNonExisting(CryptoPath cleartextPath)Verifies that no node exists for the given path.CryptoPathMapper.CiphertextDirectorygetCiphertextDir(CryptoPath cleartextPath)CiphertextFilePathgetCiphertextFilePath(Path parentCiphertextDir, String parentDirId, String cleartextName)CiphertextFilePathgetCiphertextFilePath(CryptoPath cleartextPath)CiphertextFileTypegetCiphertextFileType(CryptoPath cleartextPath)voidinvalidatePathMapping(CryptoPath cleartextPath)voidmovePathMapping(CryptoPath cleartextSrc, CryptoPath cleartextDst)CryptoPathMapper.CiphertextDirectoryresolveDirectory(Path directoryFile)
-
-
-
Method Detail
-
assertNonExisting
public void assertNonExisting(CryptoPath cleartextPath) throws FileAlreadyExistsException, IOException
Verifies that no node exists for the given path. Otherwise aFileAlreadyExistsExceptionwill be thrown.- Parameters:
cleartextPath- A path- Throws:
FileAlreadyExistsException- If the node existsIOException- If any I/O error occurs while attempting to resolve the ciphertext path
-
getCiphertextFileType
public CiphertextFileType getCiphertextFileType(CryptoPath cleartextPath) throws NoSuchFileException, IOException
- Parameters:
cleartextPath- A path- Returns:
- The file type for the given path (if it exists)
- Throws:
NoSuchFileException- If no node exists at the given path for any known typeIOException
-
getCiphertextFilePath
public CiphertextFilePath getCiphertextFilePath(CryptoPath cleartextPath) throws IOException
- Throws:
IOException
-
getCiphertextFilePath
public CiphertextFilePath getCiphertextFilePath(Path parentCiphertextDir, String parentDirId, String cleartextName)
-
invalidatePathMapping
public void invalidatePathMapping(CryptoPath cleartextPath)
-
movePathMapping
public void movePathMapping(CryptoPath cleartextSrc, CryptoPath cleartextDst)
-
getCiphertextDir
public CryptoPathMapper.CiphertextDirectory getCiphertextDir(CryptoPath cleartextPath) throws IOException
- Throws:
IOException
-
resolveDirectory
public CryptoPathMapper.CiphertextDirectory resolveDirectory(Path directoryFile) throws IOException
- Throws:
IOException
-
-