Question about remove parameter in GetFiles

Advertisement

ss_doug
Joined:
Posts:
3
Location:
work

Question about remove parameter in GetFiles

Hello,

I have a situation where my application will be downloading files from an sftp server throughout the day, and I've been asked to delete the files after they are downloaded.

The source files on the sftp server can come in at any time, and may or may not have the same filenames as those which have already been downloaded.

My problem scenario is this:
A bunch of files, including "A.txt" are placed in a directory on the sftp server.
My app calls GetFiles to get the contents of the entire directory. The remove parameter is set to True.
At some point during this process - after A.txt is downloaded - a new copy A.txt is placed on the server.
I need to know if the new copy of A.txt will get deleted by the GetFiles method.

Does GetFiles treat the download-then-delete routine as a single, atomic, operation, or is there enough of a time lag between get and remove to cause problems in my scenario?

thanks,
Doug

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum