File system List

File system List

Certified

List files in an SFTP directory

Lists entries under the given path with optional regexp filter. Sorted with sort (default NONE) before maxFiles truncation. Defaults: port 22, user home as root, password auth unless a PEM key is provided, host key checking disabled by default.

yaml
type: io.kestra.plugin.fs.sftp.List
yaml
id: fs_sftp_list
namespace: company.team

tasks:
  - id: list
    type: io.kestra.plugin.fs.sftp.List
    host: localhost
    port: "22"
    username: foo
    password: "{{ secret('SFTP_PASSWORD') }}"
    from: "/upload/dir1/"
    regExp: '.*/dir1/.*\.(yaml|yml)'
    sort: NAME_ASC
Properties

Directory URI to list

Remote host

Defaultfalse

Enable the RSA/SHA1 algorithm (disabled by default)

Key exchange algorithm

Override the KEX algorithm (e.g. diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256).

SSH private key (PEM)

PEM-formatted private key for public key auth. Convert OpenSSH keys with ssh-keygen -m PEM.

Default25

Maximum files to retrieve

Passphrase for the SSH key

Password

Reference (ref) of the pluginDefaults to apply to this task.

Default22

Remote port

SFTP proxy address

SFTP proxy password

SFTP proxy port

SFTP proxy type

One of SOCKS5, STREAM, or HTTP.

SFTP proxy username

Defaultfalse

List files recursively

Regexp filter on full path

Defaulttrue

Treat path as user home root

If true (default), remote paths are resolved relative to the authenticated user's home directory.

DefaultNONE
Possible Values
NONELAST_MODIFIED_ASCLAST_MODIFIED_DESCNAME_ASCNAME_DESC

Sort order applied to the list before maxFiles truncation

NONE (default) preserves the order in which the server returns files. LAST_MODIFIED_ASC/LAST_MODIFIED_DESC sort by last modified date, oldest/newest first. NAME_ASC/NAME_DESC sort alphabetically by file name.

Username

The list of files

Definitions
accessDatestring
Formatdate-time
fileTypestring
Possible Values
FOLDERFILEFILE_OR_FOLDERIMAGINARY
flagsinteger
groupIdinteger
namestring
pathstring
Formaturi
permissionsinteger
sizeinteger
symbolicLinkboolean
Defaultfalse
updatedDatestring
Formatdate-time
userIdinteger