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