Skip to main content

File functions

getFileContent#

The getFileContent function takes the fileId as input and returns the content of the file.

Syntax:

new NameSpace("file").getFileContent(Number fileId);

Returns: String

Example:

fileCont = new NameSpace("file").getFileContent(1);log fileCont;

putFileToRemoteFileServer#

The putFileToRemoteFileServer function takes the given string as input and puts the file in remote server.

Syntax:

new NameSpace("file").putFileToRemoteFileServer(String knownHost, String host,String userName,String password,String remoteDirectoryPath,String StringContent);

Returns: Void

getFileInfo#

The getFileInfo function takes the fileId as input and returns the file information.

Syntax:

new NameSpace("file").getFileInfo(Number fileId);

Returns: String

Example:

fileId = "<some fileId>";fileCont = new NameSpace("file").getFileInfo(fileId);log fileCont;

getFileFromRemoteFileServer#

The getFileFromRemoteFileServer function takes the given string as input and gets the file in remote server.

Syntax:

new NameSpace("file").getFileFromRemoteFileServer(String knownHost, String host,String userName,String password,String remoteDirectoryPath,String StringContent);

Returns: Void