Syntax
| SFTP.OpenDir(path As String) As String
|
|---|---|
Description
| Opens a directory for reading. To get a directory listing, first open the directory by calling this method, then call ReadDir to read the directory, and finally call CloseHandle to close the directory.
The SFTP protocol represents file names as strings. File names are assumed to use the slash ('/') character as a directory separator.
File names starting with a slash are "absolute", and are relative to the root of the file system. Names starting with any other character are relative to the user's default directory (home directory). Note that identifying the user is assumed to take place outside of this protocol.
Servers SHOULD interpret a path name component ".." as referring to the parent directory, and "." as referring to the current directory.
An empty path name is valid, and it refers to the user's default directory (usually the user's home directory).
Please note: This method does NOT "change" the remote working directory. It is only a method for opening a directory for the purpose of reading the directory listing.
SFTP is Secure File Transfer over SSH. It is not the FTP protocol. There is no similarity or relationship between FTP and SFTP. Therefore, concepts such as "current remote directory" that exist in FTP do not exist with SFTP. With the SFTP protocol, the current directory will always be the home directory of the user account used during SSH/SFTP authentication. You may pass relative or absolute directory/file paths. A relative path is always relative to the home directory of the SSH user account.
Returns Nothing on failure
|
See Also
| |
Example
| Sub Main |