FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

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

FtpServerInfo

Server information

Functions and values

Function or value Description

FTP.createAFolder server user pwd destPath

Full Usage: FTP.createAFolder server user pwd destPath

Parameters:
    server : 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

Creates a matching folder in FTP folder, if not already present.

server : 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

FTP.deleteAFile server user pwd destPath

Full Usage: FTP.deleteAFile server user pwd destPath

Parameters:
    server : 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

Deletes a single file from remote FTP folder.

server : 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

FTP.deleteAFolder server user pwd destPath

Full Usage: FTP.deleteAFolder server user pwd destPath

Parameters:
    server : 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

Deletes a single folder from remote FTP folder.

server : 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

FTP.getFtpDirContents server user pwd dirPath

Full Usage: FTP.getFtpDirContents server user pwd dirPath

Parameters:
    server : 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

Gets the contents/listing of files and folders in a given FTP server folder

server : 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

FTP.getServerInfo serverNameIp user password ftpMethod

Full Usage: FTP.getServerInfo serverNameIp user password ftpMethod

Parameters:
    serverNameIp : 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

Gets a connection to the FTP server

serverNameIp : 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

FTP.isFolderPresent server user pwd destPath

Full Usage: FTP.isFolderPresent server user pwd destPath

Parameters:
    server : 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.

server : 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

FTP.regexCheck folderName ftpContents

Full Usage: FTP.regexCheck folderName ftpContents

Parameters:
    folderName : string
    ftpContents : string

Returns: bool
Modifiers: inline

Checks to see if the `ftp content` string contains the string `Given_Folder_Name`

folderName : string
ftpContents : string
Returns: bool

FTP.uploadAFile server user pwd destPath srcPath

Full Usage: FTP.uploadAFile server user pwd destPath srcPath

Parameters:
    server : 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

Uploads a single file from local directory into remote FTP folder.

server : 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

FTP.uploadAFolder server user pwd srcPath rootDir

Full Usage: FTP.uploadAFolder server user pwd srcPath rootDir

Parameters:
    server : 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

Uploads a given local folder to a given root dir on a FTP server.

server : 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