mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 21:48:16 -08:00
Only return files in sftp directory, not other directories
This commit is contained in:
parent
541f29108b
commit
4b7d2e6feb
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue