FTP Module
Contains helpers which allow to upload a whole folder/specific file into a FTP Server.
Uses Passive Mode
FTP and handles all files as binary (and not ASCII).
Assumes direct network connectivity to destination FTP server (not via a proxy).
Does not support FTPS and SFTP.
Types
Type | Description |
Functions and values
Function or value | Description |
Full Usage:
FTP.createAFolder server user pwd destPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
destPath : string
-
The full name of folder which needs to be checked for existence, including all its
parent folders
|
|
Full Usage:
FTP.deleteAFile server user pwd destPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
destPath : string
-
The full path to the file which needs to be deleted, including all its parent
folders
|
|
Full Usage:
FTP.deleteAFolder server user pwd destPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
destPath : string
-
The full path to the folder which needs to be deleted, including all its parent
folders
|
|
Full Usage:
FTP.getFtpDirContents server user pwd dirPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
dirPath : string
-
The full name of folder whose content need to be listed
Returns: string
|
|
Full Usage:
FTP.getServerInfo serverNameIp user password ftpMethod
Parameters:
string
-
The server IP address
user : string
-
The user name to use in login credentials
password : string
-
FTP Server login password
ftpMethod : string
-
Command to send to FTP server
Returns: FtpServerInfo
|
|
Full Usage:
FTP.isFolderPresent server user pwd destPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
destPath : string
-
The full name of folder which needs to be checked for existence, including all its
parent folders
Returns: bool
|
Given a folder path, will check if that folder is present at a given root directory of a FTP server.
|
Full Usage:
FTP.regexCheck folderName ftpContents
Parameters:
string
ftpContents : string
Returns: bool
Modifiers: inline |
|
Full Usage:
FTP.uploadAFile server user pwd destPath srcPath
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
destPath : string
-
The full local file path that needs to be uploaded
srcPath : string
-
The full path to file which needs to be created, including all its parent folders
|
|
Full Usage:
FTP.uploadAFolder server user pwd srcPath rootDir
Parameters:
string
-
FTP Server name (ex: "ftp://10.100.200.300:21/")
user : string
-
FTP Server login name (ex: "joebloggs")
pwd : string
-
FTP Server login password (ex: "J0Eblogg5")
srcPath : string
-
The local server path from which files need to be uploaded
rootDir : string
-
The remote root dir where files need to be uploaded, leave this as empty, if files need
to be uploaded to root dir of FTP server
|
|