publish
plugins.it2be_cloudstorage.CloudStorageClient info


Servoy Properties Summary
String defaultPath
String host
String password
Number port
String provider
String region
String username


Servoy Methods Summary
CloudStorageSession createSession( )
Boolean get( String, String )
Array<CloudStorageListItem> list( )
Array<CloudStorageListItem> list( String )
Boolean mkdir( String )
Boolean mkdirs( String )
Boolean mv( String, String )
Boolean put( String, String )
Boolean rm( String )


Servoy Properties Details


defaultPath
String  defaultPath
Gets/Sets the default path
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient


host
String  host
Gets/Sets the host name
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient


password
String  password
Gets/Sets the password
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient


port
Number  port
Gets/Sets the port number
Returns
Number  int

Supported Clients
SmartClient, WebClient, NGClient


provider
String  provider
Gets the name of the provider
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient


region
String  region
Gets/Sets the region
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient


username
String  username
Gets/Sets the user name
Returns
String  String

Supported Clients
SmartClient, WebClient, NGClient

Servoy Methods Details


createSession
CloudStorageSession  createSession( )
Creates a session from the client, best used when performing multiple operations in quick succession.
Returns
CloudStorageSession  CloudStorageSession

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
var session = client.createSession();
session.connect();
// Perform multiple operations here
session.disconnect();


get
Boolean  get( String, String )
Downloads a file, relative from default path, to the specified local path.
Parameters
String  remotePath  Path to the target file
String  localPath  Path to the local file

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.get("/path/to/remote/file.txt", "C:\\path\\to\\local\\file.txt");


list
Array<CloudStorageListItem>  list( )
Lists the contents of the default path
Returns
Array<CloudStorageListItem>  CloudStorageListItem[]

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.list();


list
Array<CloudStorageListItem>  list( String )
Lists the contents of a specific folder, relative from the default path.
Parameters
String  path  Path to the target directory

Returns
Array<CloudStorageListItem>  CloudStorageListItem[]

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.list("/path/to/remote/directory");


mkdir
Boolean  mkdir( String )
Creates a directory on the remote server at the specified path. Assumes parent directory exists.
Parameters
String  remotePath  Path to the target directory

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.mkdir("/path/to/remote/directory");


mkdirs
Boolean  mkdirs( String )
Creates the directory or directories on the remote server at the specified path.
Parameters
String  remotePath  Path to the target directory

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.mkdirs("/path/to/remote/directory");


mv
Boolean  mv( String, String )
Moves the target file from one path to another on the remote server.
Parameters
String  sourcePath  Path to the file's current location
String  destinationPath  Path to the file's new location

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.mv("/path/to/source/file.txt", "/path/to/destination/file.txt");


put
Boolean  put( String, String )
Uploads the target local file to the remote server at the specified path.
Parameters
String  localPath  Path to the file's location on the local machine
String  remotePath  Destination path on the server

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.put("C:\\path\\to\\upload\\file.txt", "/path/to/file.txt");


rm
Boolean  rm( String )
Deletes the target file from the remote server.
Parameters
String  remotePath  Path to file on the remote server

Returns
Boolean  Boolean

Supported Clients
SmartClient, WebClient, NGClient

Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.rm("/path/to/file.txt");