Implement Remote::FS#has_file?

This commit is contained in:
Thibault Jouan committed 2013-09-26 00:28:40 +00:00
1 parent 91f2bc3567
commit 3492382968
2 files changed
+52

No files matched your search

+6
View File
@@ -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