How to check whether a remoting file exists? (General questions)
We are using the wodSFTP.NET 3.3.7 in a C# application.
We need to find a way to identify whether a file exist in a particular directory on the remoting server. We searched the question history regarding this question and noticed that there is not a simple function returning a true/false value for it. The workaround could be using the SFTP.RealPath( MyFilePathHere ) or SFTP.ListDir( MyFileDirectoryHere ) and rely on the events to get the result.
We would like to know, which is the better way? Sample code would be appreciated.
By the way, we are using the SFTP in the block mode.
Thanks.