Preserve file timestamp?

Discussion of open issues, suggestions and bugs regarding network security and data protection solution - SecureBridge
Post Reply
snorkel
Posts: 384
Joined: Tue 08 Aug 2006 15:10
Location: Milwaukee WI USA

Preserve file timestamp?

Post by snorkel » Wed 27 Feb 2013 16:06

Hi,
Does Sbridge have a built in way to preserve the file timestamp, so it's the same when
you download the file as it was on the server?

sonico
Posts: 1
Joined: Fri 20 Feb 2015 16:15

Re: Preserve file timestamp?

Post by sonico » Fri 20 Feb 2015 16:25

Hello. Did you find a way to do this?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Preserve file timestamp?

Post by ViktorV » Tue 24 Feb 2015 11:02

You can use the TScSFTPClient.OnCreateLocalFile event handler in order to set the CreateTime, AccessTime, ModifyTime values for the downloaded file equal to the server values. For this, you can use the SetFileTime WinAPI function. Note, that the SFTP protocol version must be 4 or higher, since the previous versions of SFTP don't return the CreateTime value.

Post Reply