Servoy Properties Summary | |
---|---|
String | defaultPath |
String | host |
String | password |
Number | port |
String | provider |
String | region |
String | username |
Servoy Properties Details |
---|
defaultPath
String defaultPath
Gets/Sets the default pathReturns
String String
Supported Clients
SmartClient, WebClient, NGClient
host
String host
Gets/Sets the host nameReturns
String String
Supported Clients
SmartClient, WebClient, NGClient
password
String password
Gets/Sets the passwordReturns
String String
Supported Clients
SmartClient, WebClient, NGClient
port
Number port
Gets/Sets the port numberReturns
Number int
Supported Clients
SmartClient, WebClient, NGClient
provider
String provider
Gets the name of the providerReturns
String String
Supported Clients
SmartClient, WebClient, NGClient
region
String region
Gets/Sets the regionReturns
String String
Supported Clients
SmartClient, WebClient, NGClient
username
String username
Gets/Sets the user nameReturns
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( 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");
list
Array<CloudStorageListItem> list( )
Lists the contents of the default pathReturns
Array<CloudStorageListItem> CloudStorageListItem[]
Supported Clients
SmartClient, WebClient, NGClient
Sample
var client = plugins.it2be_cloudstorage.createClient(plugins.it2be_cloudstorage.PROVIDERS.LOCAL, null);
client.list();
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, Boolean )
Uploads the target local file to the remote server at the specified path with the option of overwriting the existing file.Parameters
String localPath Path to the file's location on the local machine
String remotePath Destination path on the server
Boolean overwrite Overwrite the file if it already exists 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.put("C:\\path\\to\\upload\\file.txt", "/path/to/file.txt");
put
Boolean put( String, String )
Uploads the target local file to the remote server at the specified path (defaults to overwriting existing files).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");