Implement Remote::FS#dir?
This commit is contained in:
@@ -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