Implement Remote::FS#dir?
This commit is contained in:
1 parent
dba8a7aeee
commit
9d7af04d28
2 files changed
+45
No files matched your search
@@ -14,6 +14,12 @@ module Producer
|
||||
@sftp ||= @remote.session.sftp.connect
|
||||
end
|
||||
|
||||
def dir?(path)
|
||||
sftp.stat!(path).directory?
|
||||
rescue Net::SFTP::StatusException
|
||||
false
|
||||
end
|
||||
|
||||
def file?(path)
|
||||
sftp.stat!(path).file?
|
||||
rescue Net::SFTP::StatusException
|
||||
|
||||
Reference in new issue
Block a user