Please enable JavaScript to view this site.

A-Shell Reference

Added June 2019

Opcode XFTPF_DIR (&h00400000) in conjunction with XFTPF_SFTP allows you to create a local directory listing of a remote directory. The subroutine parameter usage is similar to that for XFTPF_GET, with localpath specifying the filespec of the directory listing, which will be created in CSV format as follows:

"file.ext",type,permissions,owner,group,size,"ctime","mtime"

Comments

The hostfile and hostdir parameters must specify the remote directory; filecards are optional. (*.* will be assumed if hostfile="".)

The host directory is not included in the "file.ext" field in the CSV directory listing.

The type field will be one of the following: regular,directory,symLink, special,unknown,socket,charDevice,blockDevice,fifo

The owner and group fields will be empty if the server does not support SFTP v4+.

The "ctime" (creation time) and "mtime" (last modification time) fields will be in RFC822 format, e.g. "Mon, 17 Jun 2019 17:40:32 -0700". See the Fn'Date'To'xxxx() functions in fndatetime.bsi SOSLIB:[907,10] for handy conversions from RFC822 (and many other) date formats.

The implementation is entirely within the ASHNET library modules for Windows and Linux, and is not dependent on any particular A-Shell version.

History

2019 June, A-Shell 6.5.1662, ASHNET library update 1.13.166:  Opcode added to A-Shell.