OneDriveModel

com.github.cloudfiles.onedrive.OneDriveModel
object OneDriveModel

A module defining the OneDrive-specific implementations for the classes referenced by a file system.

OneDrive currently does not support a mechanism to store arbitrary custom properties in the metadata for files and folders. Therefore, the data classes are fully modelled by OneDriveJsonProtocol. The OneDrive-specific file and folder implementations reference a DriveItem object storing the underlying data. Their properties obtain their values from this object. The object can also be accessed by client code to evaluate the additional information supported by the OneDrive protocol.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

trait OneDriveElement extends Element[String]

A trait implementing base functionality needed by OneDrive file and folder implementations.

A trait implementing base functionality needed by OneDrive file and folder implementations.

The trait requires access to an underlying ''DriveItem'' object. The properties defined by the ''Element'' trait are mapped to properties of this item.

Attributes

Supertypes
trait Element[String]
class Object
trait Matchable
class Any
Known subtypes
case class OneDriveFile(item: DriveItem) extends File[String], OneDriveElement

The OneDrive-specific implementation of the ''File'' trait.

The OneDrive-specific implementation of the ''File'' trait.

Value parameters

item

the underlying ''DriveItem''

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait File[String]
trait Element[String]
class Object
trait Matchable
class Any
Show all
case class OneDriveFolder(item: DriveItem) extends Folder[String], OneDriveElement

The OneDrive-specific implementation of the ''Folder'' trait.

The OneDrive-specific implementation of the ''Folder'' trait.

Value parameters

item

the underlying ''DriveItem''

Attributes

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

Value members

Concrete methods

def newFile(size: Long, name: String, id: String, description: Option[String], info: Option[WritableFileSystemInfo]): OneDriveFile

Constructs a ''OneDriveFile'' object for creating or updating a file on the server. As only a small number of a file's properties are writable, creating such an object manually and passing in all the dummy values is cumbersome. Therefore, this utility function can be used, which deals only with relevant properties and sets defaults for all others. Note that the size of the file is required for a correct upload.

Constructs a ''OneDriveFile'' object for creating or updating a file on the server. As only a small number of a file's properties are writable, creating such an object manually and passing in all the dummy values is cumbersome. Therefore, this utility function can be used, which deals only with relevant properties and sets defaults for all others. Note that the size of the file is required for a correct upload.

Value parameters

description

the description or '''null''' for undefined

id

the ID of the file or '''null''' for undefined

info

optional object with local file system information

name

the name of the file or '''null''' for undefined

size

the size of the file (in bytes)

Attributes

Returns

the newly created ''OneDriveFile'' object

def newFolder(name: String, id: String, description: Option[String], info: Option[WritableFileSystemInfo]): OneDriveFolder

Constructs a ''OneDriveFolder'' object for creating or updating a folder on the server. As only a small number of a folder's properties are writable, creating such an object manually and passing in all the dummy values is cumbersome. Therefore, this utility function can be used, which deals only with relevant properties and sets defaults for all others.

Constructs a ''OneDriveFolder'' object for creating or updating a folder on the server. As only a small number of a folder's properties are writable, creating such an object manually and passing in all the dummy values is cumbersome. Therefore, this utility function can be used, which deals only with relevant properties and sets defaults for all others.

Value parameters

description

the description or '''null''' for undefined

id

the ID of the folder or '''null''' for undefined

info

optional object with local file system information

name

the name of the folder

Attributes

Returns

the newly created ''OneDriveFolder'' object