You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could we add an option to download files while preserving their modification and access times? A flag recursive: true added to the method Net::SFTP::Session#download would be nice to have. It could work like the -p option of the sftp command line.
Here's my quick and dirty fix:
files = []
sftp.download!("destination", "local", recursive: true) do |event, downloader, *args|
case event
when :close then
files << args[0]
when :finish then
files.each { |file| File.utime(sftp.stat!(file.remote).atime, sftp.stat!(file.remote).mtime, file.local) }
end
end
I can work on a pull request if you support the idea.
The text was updated successfully, but these errors were encountered:
Hi there,
Could we add an option to download files while preserving their modification and access times? A flag
recursive: true
added to the methodNet::SFTP::Session#download
would be nice to have. It could work like the -p option of the sftp command line.Here's my quick and dirty fix:
I can work on a pull request if you support the idea.
The text was updated successfully, but these errors were encountered: