Integration Server 10.5 | Built-In Services Reference Guide | Client Folder | Summary of Elements in this Folder | pub.client.sftp:ls
 
pub.client.sftp:ls
WmPublic. Retrieves the remote directory listing of the specified path. If path is not specified, the pub.client.sftp:ls service retrieves the file listing of the current remote directory. The pub.client.sftp:ls service also retrieves additional details such as permissions and ownership information.
Input Parameters
sessionKey
String Unique key for the current SFTP session. The sessionKey parameter is returned by the pub.client.sftp:login service.
path
String Optional. Absolute or relative path of the remote directory. If no path is specified, the pub.client.sftp:ls service retrieves the directory listing of the current remote directory.
You can use the wildcard characters asterisk (*) and question mark (?) after the last slash mark (/) to view all remote directories that match the specified path.
Note:
SFTP client version 2 does not support the use of wildcard characters, such as '*' and '?', or a filename in the path field. This is different from SFTP client version 1.
Output Parameters
returnCode
String Standard SFTP protocol return code.
returnMsg
String Text message describing the return code.
dirList
Document List of directories matching the pattern specified in the path parameter. Following are the parameters in the document:
Key
Description
fileName
String Specifies the name of the remote file.
fileSize
String Specifies the size of the remote file.
permissions
String Specifies the access permission of the file (read, write, or execute).
lastAccessTime
String Specifies the time when the file was last accessed.
lastModifiedTime
String Specifies the time when the file was last modified.
uid
String Specifies the user ID of the file owner.
gid
String Specifies the group id associated with the file.
longName
String Specifies the long name of the ls entry. It contains all the parameters space separated.
Usage Notes
You cannot execute SFTP commands in parallel using the same session key.
The date format for SFTP client services is determined by the watt.server.sftp.dateStampFmt property.