LocalFsConfig

com.github.cloudfiles.localfs.LocalFsConfig
case class LocalFsConfig(basePath: Path, executionContext: ExecutionContext, linkOptions: Seq[LinkOption], sanitizePaths: Boolean)

The configuration class for the local file system implementation.

The most important property is the base path of the local file system. Relative paths are resolved against this root folder. As the ''FileSystem'' API accepts arbitrary paths, it is possible to manipulate elements that are not in the sub tree spawned by the base path. Depending on the context of an application, this may be a security issue. To prevent this, this configuration supports an option to enable a mode in which paths are sanitized; this option is '''true''' per default. In this mode, all paths passed to the file system are normalized, and it is checked whether they are actually sub paths of the base path. If this check fails, the operation fails with an exception.

As the file system implementation typically uses blocking operations, a dedicated ''ExecutionContext'' has to be provided. This is to force the user to think about this option, because simply using the execution context of an already available actor system may not be the best option.

Value parameters

basePath

the base path of the file system; this should be an absolute path

executionContext

the execution context

linkOptions

options for dealing with links

sanitizePaths

flag whether paths should be checked against the base path

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product