Global

Methods

safeStringify(v) → {String}

Source:
See:

Stringifies a JSON object and make it header-safe by encoding non-ASCII characters.

Parameters:
Name Type Description
v Object

JSON object to stringify

Returns:

the stringified object with special chars encoded

Type
String

getClient(credentials) → {Promise.<Ftp>}

Source:

Initialize a new FTP client

Parameters:
Name Type Description
credentials Credentials

Access info for the FTP server

Returns:

a promise for a FTP client

Type
Promise.<Ftp>

Type Definitions

ConnectorState

Source:
Properties:
Name Type Description
isLoggedIn boolean

Flag wether the user is logged in.

isOAuth boolean

Flag wether the connector uses OAuth as authentication mechanism.

username string

Name used to log in.

State of the connector

Type:
  • Object

ConnectorStaticInfos

Source:
Properties:
Name Type Description
name string

ID of the connector. This will be use to select the connector in unifile.

displayName string

Name that should be display. Allows characters forbidden in name.

icon string

Path to an icon for this connector.

description string

Description of the connector.

Static infos of the connector

Type:
  • Object

ConnectorInfos

Source:
To Do:
  • Use ConnectorState and ConnectorStaticInfos docs
Properties:
Name Type Description
name string

ID of the connector. This will be use to select the connector in unifile.

displayName string

Name that should be display. Allows characters forbidden in name.

icon string

Path to an icon for this connector.

description string

Description of the connector.

isLoggedIn boolean

Flag wether the user is logged in.

isOAuth boolean

Flag wether the connector uses OAuth as authentication mechanism.

username string

Name used to log in.

Representation of a connector infos

Type:
  • Object

Credentials

Source:
Properties:
Name Type Attributes Description
host string <optional>

URL to the service

port string <optional>

Port the auth service is listening to

user string <optional>

Username for the service

password string <optional>

Password for the service

For OAuth services

code string <optional>

OAuth code for the service

state string <optional>

OAuth state for the service

Credentials of a service

Type:
  • Object

FileInfos

Source:
Properties:
Name Type Description
name string

Name of the file

size number

Size of the file in bytes

modified string

ISO string representation of the date from last modification

isDir boolean

Wether this is a directory or not

mime string

MIME type of this file

Representation of a file

Type:
  • Object