Description
This class provides a list of files on an FTP or SFTP server.
Parameters
Parameter | Description |
|---|---|
port | Port of the server. |
channel | The ID of the channel used for the login information. Note: FTP channel or SSH channel for SFTP. |
pattern | File name pattern. Example: * or *.xml |
host | URL/IP of the server. |
activeMode | (optional) If true, active FTP mode is used. Default: false. |
full_list | (optional) If true, additional file information parameters are output and the following header is inserted: filename, is dir, size, create date, last access date, modification date. Can only be used with type SFTP. Default: false. |
dir | The directory for which the list is to be generated. Use . for the home directory. |
type | The type of the server (must match the setting in the channel). Permitted values: SFTP, FTP, FTPS_IMPL, FTPS_EXPL. |
displayAbsoluteSshPath | (optional) If true, the path is displayed in the usual Unix format (SSH Virtual Unix User Style) (e.g., /home/username/folder1/folder2/file.txt). Can only be used with type SFTP. Default: false. |
recursive | (optional) Use true if all subdirectories of “dir” should also be searched and listed. Default: false. |
Example
File list
./sub/test3.txt
./sub
./test1.txt