Back to product page
- Introduction
- Overview
- License agreement
- Getting Started
- Objects
- Enumerations
- wodSFTP
- Methods
- Abort
- About
- AppendData
- AppendFile
- Connect
- DeleteFile
- DeleteFiles
- Disconnect
- ExtendedCmd
- GetAttributes
- GetData
- GetDataAt
- GetFile
- GetFileAt
- GetFiles
- ListAttributes
- ListDir
- ListNames
- LoopFiles
- MakeDir
- PutData
- PutDataAt
- PutFile
- PutFileAt
- PutFiles
- RealPath
- RemoteClose
- RemoteOpen
- RemoteRead
- RemoteWrite
- RemoveDir
- Rename
- SetAttributes
- SetAttributes64
- Properties
- Authentication
- Blocking
- BufferSize
- ClientName
- Compression
- Encryption
- EncryptionList
- ErrorText
- Extensions
- FingerPrint
- FIPS
- HMacList
- Hostname
- KeepAlives
- KeyExchangeList
- KeySignatureList
- LastError
- ListItem
- LocalPath
- Login
- MaxTransferRate
- MyHostname
- MyIP
- Notification
- Password
- Port
- PrivateKey
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RemoteIdentification
- RemotePath
- Resume
- ServerErrorCode
- ServerErrorText
- State
- StateText
- Timeout
- Timezone
- TransferMode
- TransferRate
- TransferTime
- UseIPv6
- Version
- Events
- Methods
- IwodSFTPNotify
- SftpItem
- SftpItems
- How to get support?
- Technical information
- Fast notifications interface
- Error list
ListAttributes method
Lists the contents of a directory as a structure.
Type
NoneSyntax
- Basic
object.ListAttributes [RemotePath]
The ListAttributes(object,RemotePath) syntax has these parts:
The ListAttributes(object,RemotePath) syntax has these parts:
object | An expression evaluating to an object of type wodSFTP. |
RemotePath | Optional. A Variant value. Full path to the directory on the server. |
Remarks
The ListAttributes method will send a request to the server to retrieve the complete directory structure in a collection of SftpItem objects, rather than a line-by-line listing that needs to be parsed. As a result of calling this method, the AttributesData event will fire (possibly more than once if there are many files in the directory), where you can access each item's Name and Permissions etc..Once completed, the Done event will be fired. If no error occurs, the ErrorCode argument in the Done event will be set to 0 (zero). If an error occurs, the ErrorCode will hold the number of the error and ErrorText will contain a description for the error.
No wildcards can be used for the RemotePath argument. The RFC protocol specification for SFTP does not allow them.
To retrieve a full listing of files/directories for a given path (including size, permissions, dates...) you should use the ListDir method. To get just names, you can use ListNames.