Re: Using Directory.Exists allways give "false"
Who says that
Use
https://winscp.net/eng/docs/library_session_fileexists
It works for directories too.
If you want to test for directory explicitly, use
https://winscp.net/eng/docs/library_session_getfileinfo
https://winscp.net/eng/docs/library_remotefileinfo
Directory.Exists
should work for remote paths?
Use
Session.FileExists
.
https://winscp.net/eng/docs/library_session_fileexists
It works for directories too.
If you want to test for directory explicitly, use
Session.GetFileInfo
and test RemoteFileInfo.IsDirectory
:
https://winscp.net/eng/docs/library_session_getfileinfo
https://winscp.net/eng/docs/library_remotefileinfo