FMPFile.Builder

Description

The FMPFile.Builder class is a builder for the FMPFile class.

class Builder

Methods

Method Description

remotePath(_:)

Save path to file or directory on server to variable.
func remotePath(_ path: String) -> Builder

Parameters:

  • path. The path to file or directory on server.

mount(_:) Save name of connection to storage on server to variable.
func mount(_ mount: String) -> Builder

Parameters:

  • mount. Name of connection to storage on server.

isDirectory(_:) Save type - file or directory - to variable.
func isDirectory(_ isDirectory: Bool = true) -> Builder

Parameters:

  • isDirectory. If the value is true, the directory type is set. If the value is false, the file type is set.

localPath(_:) Save path to file or directory in the application local directory relative to the Documents folder to variable.
func localPath(_ path: String) -> Builder

Parameters:

  • path. The path to file or directory in the application local directory relative to the Documents folder.

depth(_:) Save depth of work with directory to variable.
func depth(_ depth: Int) -> Builder

Parameters:

  • depth. Depth of work with directory.

build() Build an instance of the FMPFile class. It returns the object of the FMPFile type.
func build() -> FMPFile

Example

Build an instance of the FMPFile class:

// Build an instance of the FMPFile class with various settings
let file: FMPFile = fmp.file
    .remotePath("remotePath") // By default "."
    .mount("mount") // By default ""
    .isDirectory() // By default false
    .localPath("localPath") // By default ""
    .depth(2) // By default -1
    .build()

See also:

FMPWrapper Framework | Classes