PathComponentsResolver

com.github.cloudfiles.crypt.fs.resolver.PathComponentsResolver
class PathComponentsResolver[ID, FILE <: File[ID], FOLDER <: Folder[ID]] extends PathResolver[ID, FILE, FOLDER]

A specialized ''PathResolver'' implementation that resolves paths directly by matching the single components against the decrypted path names on each level.

This is the most basic resolver to be used if the single path components cannot simply be encrypted (because encryption involves a random initial vector, so that each encrypt operation yields different results). The implementation navigates through the single path components. For each component, the folder content is requested, and the names of its elements are decrypted, until a match is found. This is a rather expensive operation.

This implementation is appropriate if only few resolve operations are done, and the client mainly uses IDs to access elements directly. In this case, for the few resolve operations there is no benefit in spending additional effort in caching or other optimizations.

Type parameters

FILE

the type of files

FOLDER

the type of folders

ID

the type of IDs used by the file system

Attributes

Graph
Supertypes
trait PathResolver[ID, FILE, FOLDER]
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def resolve(components: Seq[String], fs: FileSystem[ID, FILE, FOLDER, FolderContent[ID, FILE, FOLDER]], cryptConfig: CryptConfig)(implicit system: ActorSystem[_]): Operation[ID]

Resolves a path (specified as a sequence of path components) against a file system. If this operation is successful, a ''Future'' with the ID of the element referenced by the path is returned.

Resolves a path (specified as a sequence of path components) against a file system. If this operation is successful, a ''Future'' with the ID of the element referenced by the path is returned.

Value parameters

components

the sequence of path components to resolve

cryptConfig

the cryptography-related configuration

fs

the ''FileSystem'' in which to resolve the path

system

the actor system

Attributes

Returns

an ''Operation'' with the result of the resolve operation

Definition Classes

Inherited methods

override def close(): Unit

Frees up resources used by this object when it is no longer needed. This base implementation does nothing.

Frees up resources used by this object when it is no longer needed. This base implementation does nothing.

Attributes

Definition Classes
PathResolver -> AutoCloseable
Inherited from:
PathResolver