SFTP Read Dir.vi

'SFTP Read Dir.vi' connector pane

SFTP Read Dir.vi connector pane

Description

Retrieve metadata of next file in directory.

Directory must have been opened for reading by calling SFTP Open Dir.vi.

An empty string in the File Name member of the Directory Entry Cluster output indicates that there are no more files in this directory.

The process required to list the contents of a directory goes as follows:

  1. Call SFTP Open Dir.vi to open the directory for reading.

  2. Call SFTP Read Dir.vi repeatedly until it returns an empty filename. An empty filename indicates that all files have been read.

  3. Call SFTP Close Dir.vi to close the directory.

Note

This is a low-level VI whose usage is not typical. For a quick 1-step directory listing function, use SFTP EZ Directory Listing.vi.

Inputs

cbool Localize Time?

Required

No

Default

True true

If True true, then the File Info member of the output Directory Entry Cluster will convert all timestamp data to the local machine’s timezone. Otherwise, timestamps are GMT.

cu64 LabSSH Session

Required

Yes

SSH session refnum.

cerrcodeclst error in

Required

No

Default

No Error

Incoming error from previous VI call. Is passed through to error out.

Warning

LabVIEW will not execute Call Library Function Node if there is an error present on the wire. Ensure that there is no error prior to calling this VI – unexpected behavior will occur.

ci32 Timeout msec

Required

No

Default

5000

Amount of time in milliseconds to wait for a response from remote host before a timeout error occurs.

Outputs

iu64 LabSSH Session Out

Duplicate SSH session refnum.

icclst Directory Entry Cluster

Cluster of information pertaining to the file in directory.

Members:

istr File Name

The name of the file. If an empty string, then there are no more files to be read.

icclst File Info

Contains metadata pertaining to the requested file.

Members:

iu32 Size

Size of the file in bytes.

iu32 UID

File’s user id.

iu32 GID

File’s group owner id.

iu16 Permissions

Permissions assigned to file.

iatrn Accessed Time

The last-accessed timestamp of the file as reported by the server. If the Localize Time? input is True true, then this timestamp uses this machine’s local time zone. Otherwise, it is GMT.

iatrn Modified Time

The last-modified timestamp of the file as reported by the server. If the Localize Time? input is True true, then this timestamp uses this machine’s local time zone. Otherwise, it is GMT.

icclst File Type [Cluster]

Collection of flags which describe the file type.

Members:

ibool Socket

If True true, the file is a socket.

ibool Directory

If True true, the file is a directory.

ibool Special Char

If True true, the file is a special character file.

ibool Special Block

If True true, the file is a special block file.

ibool Symbolic Link

If True true, the file is a symbolic link.

ibool Regular

If True true, the file is a regular file.

ibool Named Pipe (FIFO)

If True true, the file is a named pipe, aka FIFO.

ierrcodeclst error out

Error (if any) resulting from this VI call.