Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Commented Issue: Remote File exists not working [1574]

$
0
0
I've tried to use sftp.Exists(String) do not work for files. Already tested for file and for directory. Directory work well, but files are not recognized.
Comments: ** Comment from web user: oeriksen **

I've been looking at this and see that the Exists function was rewritten because it caused a subsequent Delete to fail on some system (file was not closed by the SSH server). The problem is that on some systems RequestRealPath doesn't throw an error. I would guess some (or all) Windows based servers, at least that the case for me. I agree on the current solution, it's much better than a file open and close, but wouldn't it be better to use RequestLStat instead of RequestRealPath? I can't imagine any systems not throwing an error if file or directory doesn't exist when executing that. Or is there any other reason not to use it?


Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>