com.github.cloudfiles.core.delegate

Members list

Type members

Classlikes

trait DelegateFileSystem[ID, FILE, FOLDER] extends ExtensibleFileSystem[ID, FILE, FOLDER, FolderContent[ID, FILE, FOLDER]]

A trait implementing an ''ExtensibleFileSystem'' that delegates all operations to another file system, acting as delegate.

A trait implementing an ''ExtensibleFileSystem'' that delegates all operations to another file system, acting as delegate.

This trait can be used as a base for implementing extension file systems that operate on top of another file system and add specific functionality. Such extension file system implementations can extend this trait and override the operations they need to adapt, while all other operations are performed by the underlying file system directly.

Type parameters

FILE

the type to represent a file

FOLDER

the type to represent a folder

ID

the type of element IDs

Attributes

Supertypes
trait ExtensibleFileSystem[ID, FILE, FOLDER, FolderContent[ID, FILE, FOLDER]]
trait FileSystem[ID, FILE, FOLDER, FolderContent[ID, FILE, FOLDER]]
trait AutoCloseable
class Object
trait Matchable
class Any
Show all
case class ElementPatchSpec(patchName: Option[String], patchSize: Option[Long])

A data class describing changes on the properties of an file system element to be applied on behalf of a delegate file system.

A data class describing changes on the properties of an file system element to be applied on behalf of a delegate file system.

A file system that adds specific functionality to another file system typically has to modify some attributes of file and folder objects obtained from the user or the underlying file system. This is problematic because the concrete type of the file and folder objects depends on the wrapped file system. Simply wrapping these objects to override some of their attributes would be incorrect, as the original objects might contain additional information specific to the implementation, which can no longer be accessed by the file system if the objects are wrapped.

As a solution to this problem, this class defines optional fields for the writable properties of files or folders that can be set to values that should override the original properties of the corresponding file system elements. A concrete com.github.cloudfiles.core.FileSystem implementation must be able to apply these patches to its own data structures.

Value parameters

patchName

optional value to override the name

patchSize

optional value to override the size

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait ExtensibleFileSystem[ID, FILE, FOLDER, FOLDER_CONTENT] extends FileSystem[ID, FILE, FOLDER, FOLDER_CONTENT]

A trait describing a FileSystem whose basic functionality can be extended by delegating file systems.

A trait describing a FileSystem whose basic functionality can be extended by delegating file systems.

The basic idea is that an ''ExtensibleFileSystem'' is wrapped inside another ''FileSystem'' implementation. The outer file system uses the wrapped one to access files and folders, but manipulates these objects in a specific way (e.g. encrypting their content). For this to work, the original file system must provide some means to manipulate the attributes of files and folders, so that the outer file system can implement its own functionality. Therefore, this trait extends the base trait by some functions that support such a manipulation.

Note that the functions added by this trait are not intended to be called by end users; they are rather used by extension file systems to execute their specific manipulations.

Attributes

Supertypes
trait FileSystem[ID, FILE, FOLDER, FOLDER_CONTENT]
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
trait DelegateFileSystem[ID, FILE, FOLDER]