ArxOne / FTP

Simple FTP client
MIT License
37 stars 15 forks source link

Support "FileExists" method #2

Closed danpetitt closed 9 years ago

danpetitt commented 9 years ago

I need to be able to determine if a file exists and if it does delete it so i can then rename the uploaded file (which was uploaded with a temporary filename).

I would suggest using MLST if its supported for speed as the folder i have to upload to has 30k files in it and is therefore very slow.

I suppose I could just 'delete' the file and ignore the response?

picrap commented 9 years ago

To check if a file exists, I used the STAT command. But this can be included in the library anyway. Thanks for suggestion.

picrap commented 9 years ago

FtpClient.GetEntry() is your new friend (NuGet package 1.1)