Class: FileHandler

GPUdb.FileHandler(gpuDBopt)

FileHandler API object that provides access to KIFS server functions.

Constructor

new FileHandler(gpuDBopt)

Creates a FileHandler object
Parameters:
Name Type Attributes Description
gpuDB Object <optional>
GPUdb API object that provides access to GPUdb server functions.
Source:

Methods

download(filenames, options) → {Promise}

Downloads the list of files from KIFS to local filesystem.
Parameters:
Name Type Description
filenames Array Filepaths for KIFS files to be downloaded.
options Map Download options. A placeholder for future options.
Source:
Returns:
A promise that will be fulfilled with object, if no callback function is provided. Returns an array containing base64 file data.
Type
Promise

download_and_save(filenames, destination, options) → {Promise}

Downloads the list of files from KIFS to local filesystem.
Parameters:
Name Type Description
filenames Array Filepaths for KIFS files to be downloaded.
destination String Destination FS local path
options Map Download options A placeholder for future options.
Source:
Returns:
A promise that will be fulfilled with the response object, if no callback function is provided.
Type
Promise

upload(filenames, destination, options) → {Promise}

Uploads the list of files from local filesystem to KIFS.
Parameters:
Name Type Description
filenames Object Files to be uploaded. Can be a single string or multiple strings containing the full path of the files, or file objects (single or multiple) containing the file data.
destination String Destination kifs path
options Map Upload options A placeholder for future options.
Source:
Returns:
A promise that will be fulfilled with true for success and false for faliure (if no callback function is provided).
Type
Promise