LocalFsModel

com.github.cloudfiles.localfs.LocalFsModel
object LocalFsModel

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

case class LocalFile(id: Path, name: String, createdAt: Instant, lastModifiedAt: Instant, size: Long, lastModifiedUpdate: Option[Instant]) extends File[Path], LocalUpdatable

A data class representing a file in the local file system.

A data class representing a file in the local file system.

This class contains the attributes of a local file supported by the implementation. When a file is resolved, the values of these attributes are determined and stored in an instance - so they do not provide a life view to the underlying file system object.

When creating or updating a file it is possible to set some selected attributes. This is done by setting the properties starting with the prefix ''update''.

Value parameters

createdAt

the file's creation time

id

the path to the file

lastModifiedAt

the file's last modified time

lastModifiedUpdate

optional property to update the last modified time

name

the name of the file

size

the file size (in bytes)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait File[Path]
trait Element[Path]
class Object
trait Matchable
class Any
Show all
case class LocalFolder(id: Path, name: String, createdAt: Instant, lastModifiedAt: Instant, lastModifiedUpdate: Option[Instant]) extends Folder[Path], LocalUpdatable

A data class representing a folder in the local file system.

A data class representing a folder in the local file system.

This class is used to read the attributes of a local folder. In addition, it has properties that are evaluated when a folder is created or updated.

Value parameters

createdAt

the folder's creation time

id

the path to the folder

lastModifiedAt

the folder's last modified time

lastModifiedUpdate

optional property to update the last modified time

name

the name of the folder

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Folder[Path]
trait Element[Path]
class Object
trait Matchable
class Any
Show all

A trait that defines the properties that can be updated for elements in the local file system.

A trait that defines the properties that can be updated for elements in the local file system.

The trait is implemented by the representations for local files and folders. This makes it possible to treat these classes analogously when it comes to updates.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class LocalFile
class LocalFolder

Value members

Concrete methods

def newFile(path: Path, name: String, lastModifiedAt: Option[Instant]): LocalFile

Constructs a ''LocalFile'' object that can be used to create or update a file. This is a convenience function that takes only the attributes into account that are relevant for a modification of the file; read-only properties are ignored.

Constructs a ''LocalFile'' object that can be used to create or update a file. This is a convenience function that takes only the attributes into account that are relevant for a modification of the file; read-only properties are ignored.

Value parameters

lastModifiedAt

an optional last modified time to set

name

the name of the file; if undefined, it is derived from the path if present

path

the optional path of the file

Attributes

Returns

the ''LocalFile'' object to create a new file

def newFolder(path: Path, name: String, lastModifiedAt: Option[Instant]): LocalFolder

Constructs a ''LocalFolder'' object that can be used to create or update a folder. This is a convenience function that takes only the attributes into account that are relevant for a manipulation of the folder; read-only properties are ignored.

Constructs a ''LocalFolder'' object that can be used to create or update a folder. This is a convenience function that takes only the attributes into account that are relevant for a manipulation of the folder; read-only properties are ignored.

Value parameters

lastModifiedAt

an optional last modified time to set

name

the name of the folder; if undefined, it is derived from the path if present

path

the optional path of the folder

Attributes

Returns

the ''LocalFolder'' object to create a new folder

Concrete fields

final val TimeUndefined: Instant

Constant for a time that is used if no information is available. Rather than having '''null''' values in file or folder objects, this value is used.

Constant for a time that is used if no information is available. Rather than having '''null''' values in file or folder objects, this value is used.

Attributes