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