You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this approach after the read is perform, the file still exists in the SFTP Server.
Second Approach
sftp.file.open('remote/test.csv') do |file|
file.read
end
With this approach at the end of the block, the file is no longer in the SFTP Server, would like to understand why it works as such.
Looking at the code, for the second approach, we are ensuring that the file is always closed once the block is executed, hence the question is why does closing the file removes it from the server?
Thank you!
The text was updated successfully, but these errors were encountered:
First Approach
With this approach after the read is perform, the file still exists in the SFTP Server.
Second Approach
With this approach at the end of the block, the file is no longer in the SFTP Server, would like to understand why it works as such.
Looking at the code, for the second approach, we are ensuring that the file is always closed once the block is executed, hence the question is why does closing the file removes it from the server?
Thank you!
The text was updated successfully, but these errors were encountered: