Only return files in sftp directory, not other directories

pull/1/head
rebuilt 3 years ago
parent 541f29108b
commit 4b7d2e6feb

@ -8,6 +8,8 @@ module Sftp
uri = URI.parse(sftptogo_url)
Net::SFTP.start(uri.host, uri.user, password: uri.password) do |sftp|
sftp.dir.foreach(path) do |entry|
next unless entry.file?
filename = entry.name
puts filename

Loading…
Cancel
Save