Syntax
| SFTP.CopyFileAttr(localFilename As String, remoteFilename As String, ByVal isHandle As Long) As Long
|
---|---|
Description
| Sets the date/time and other attributes of a remote file to be equal to that of a local file.
The attributes copied depend on the SFTP version of the server:
SFTP v3 (and below)
Last-Modified Date/Time
Last-Access Date/Time
SFTP v4, v5
Last-Modified Date/Time
Last-Access Date/Time
Create Date/Time
SFTP v6 (and above)
Last-Modified Date/Time
Last-Access Date/Time
Create Date/Time
Read-Only Flag
Hidden Flag
Archive Flag
Compressed Flag
Encrypted Flag
Notes:
(1) The Last-Access date/time may or may not be set. Chilkat has found that the Last-Access time is set to the current date/time, which is probably a result of the operating system setting it based on when the SFTP server is touching the file.
(2) At the time of this writing, it is unknown whether the compressed/encryption settings for a local file are transferred to the remote file. For example, does the remote file become compressed and/or encrypted just by setting the flags? It may depend on the SFTP server and/or the remote filesystem.
(3) Dates/times are sent in GMT. SFTP servers should convert GMT times to local time zones.
Returns 1 for success, 0 for failure.
|
See Also
| |