SFTP EZ Directory Listing.vi¶
Description¶
List all files in a remote directory and retrieve metadata for every file in the directory.
Inputs¶
Localize Time?¶
Required: | No |
---|---|
Default: | True |
If True , then File Info member of the output Array of Directory Entries will convert its timestamps to the local machine’s timezone. Otherwise, timestamps are GMT.
Remote Directory Path¶
Required: | Yes |
---|
Remote filesystem path to requested directory. This can be a relative path or an absolute path.
Examples: | /home/user/data/ ./data/ |
---|
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.
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¶
LabSSH Session Out¶
Duplicate SSH session refnum.
Array of Directory Entries¶
Array of file clusters. Each cluster element represents a file in the directory.
Elements:
Directory Entry Cluster
File entry cluster containing file name and metadata.
Members:
- File Name
- The name of the file.
- File Info
Contains metadata pertaining to the requested file.
Members:
- Size
- Size of the file in bytes.
- UID
- File’s user id.
- GID
- File’s group owner id.
- Permissions
- Permissions assigned to file.
- Accessed Time
- The last-accessed timestamp of the file as reported by the server. If the Localize Time? input is True , then this timestamp uses this machine’s local time zone. Otherwise, it is GMT.
- Modified Time
- The last-modified timestamp of the file as reported by the server. If the Localize Time? input is True , then this timestamp uses this machine’s local time zone. Otherwise, it is GMT.
- File Type [Cluster]
Collection of flags which describe the file type.
Members:
- Socket
- If True , the file is a socket.
- Directory
- If True , the file is a directory.
- Special Char
- If True , the file is a special character file.
- Special Block
- If True , the file is a special block file.
- Symbolic Link
- If True , the file is a symbolic link.
- Regular
- If True , the file is a regular file.
- Named Pipe (FIFO)
- If True , the file is a named pipe, aka FIFO.
Number of Entries¶
Total number of files found in the directory.
error out¶
Error (if any) resulting from this VI call.