pdk.node.Smb

contains functions that can be used with SMB Connector

The functions listed below should be used within the SMB Node.

All functions


copyDirectory

Copies the directory at the specified location on the SMB server to the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. The directory at the specified location on the SMB server is copied to the specified location on the SMB server.

Possible exceptions

  • NullPointerException - Throws an error if at least one argument isNULL

  • FileOperationException - Throws an error if the connection has not been established, or if either the source or destination path does not exist.


copyFile

Copies a file to the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. The file is copied to the specified location on the SMB server.

Possible exceptions

  • NullPointerException - Throws an error if at least one argument isNULL

  • FileOperationException - Throws an error if the connection has not been established, or if either the source or destination path does not exist.


deleteDirectory

Deletes the directory at the specified location on the SMB server. The directory must be empty before it can be deleted.

Arguments:

Result:

  • Result is not returned. The directory at the specified location on the SMB server is deleted.

Possible exceptions


deleteFile

Deletes a file from the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. The file at the specified location on the SMB server is deleted.

Possible exceptions


downloadFile

Downloads a file from the specified location on the SMB server.

Arguments:

Result:

Possible exceptions


getDirectoryFilesNames

Retrieves the names of the files in the specified directory on the SMB server.

Arguments:

Result:

Possible exceptions


getDirectorySubdirectoriesNames

Retrieves the names of the subdirectories in the specified directory on the SMB server.

Arguments:

Result:

Possible exceptions


isDirectoryEmpty

Checks if the directory at the specified location on the SMB server is empty.

Arguments:

Result:

Possible exceptions


isDirectoryExists

Checks if the directory exists at the specified location on the SMB server.

Arguments:

Result:

Possible exceptions


isFileExists

Checks if the file exists at the specified location on the SMB server.

Arguments:

Result:

Possible exceptions


moveDirectory

Moves the directory at the specified location on the SMB server to the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. The directory at the specified location on the SMB server is moved to the specified location on the SMB server.

Possible exceptions

  • NullPointerException - Throws an error if at least one argument isNULL

  • FileOperationException - Throws an error if the connection has not been established, or if either the source or destination path does not exist.


moveFile

Moves the file at the specified location on the SMB server to the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. The file at the specified location on the SMB server is moved to the specified location on the SMB server.

Possible exceptions

  • NullPointerException - Throws an error if at least one argument isNULL

  • FileOperationException - Throws an error if the connection has not been established, or if either the source or destination path does not exist.


newDirectory

Creates a new directory at the specified location on the SMB server.

Arguments:

  • path :: pdk.core.String - The source path on the SMB server. It should include the new directory at the end.

Result:

  • Result is not returned. A new directory is created at the specified location on the SMB server.

Possible exceptions


newFile

Creates a new file in the specified location on the SMB server.

Arguments:

Result:

  • Result is not returned. A new file is created in the specified location on the SMB server.

Possible exceptions


renameDirectory

Renames the directory at the specified location on the SMB server to the specified name.

Arguments:

Result:

  • Result is not returned. The directory at the specified location on the SMB server is renamed to the specified name.

Possible exceptions


renameFile

Renames the file at the specified location on the SMB server to the specified name.

Arguments:

Result:

  • Result is not returned. The file at the specified location on the SMB server is renamed to the specified name.

Possible exceptions


rewriteFileContent

Replaces the content of the file at the specified location on the SMB server with the specified content.

Arguments:

Result:

  • Result is not returned. The content of the file at the specified location on the SMB server is replaced with the specified content.

Possible exceptions


uploadFile

Uploads a file to the specified location on the SMB server.

Arguments:

  • path :: pdk.core.String - The source path on the SMB server. It should include the new directory at the end.

  • file: pdk.io.File - The file

Result:

  • Result is not returned. The file is uploaded to the specified location on the SMB server.

Possible exceptions

Last updated