/// <summary> /// Does the specified path exist on the remote folder? /// </summary> public bool Exists(string cpath) { /* * if (FTP) * return _ftpc.FileExists(cpath) || _ftpc.DirectoryExists(cpath); * else * return _sftpc.Exists(cpath); */ bool bFileExists = false; bool bFolderExists = false; if (FTP) { try { bFileExists = _ftpc.FileExists(cpath); } catch (System.IO.IOException e) { Log.Write(l.Client, e.ToString()); bFileExists = false; } bFolderExists = _ftpc.DirectoryExists(cpath); return(bFileExists || bFolderExists); } else { return(_sftpc.Exists(cpath)); } }
/// <summary> /// Does the specified path exist on the remote folder? /// </summary> public bool Exists(string cpath) { if (FTP) { return(_ftpc.FileExists(cpath) || _ftpc.DirectoryExists(cpath)); } return(_sftpc.Exists(cpath)); }
/// <summary> /// Does the specified path exist on the remote folder? /// </summary> public override bool Exists(string cpath) { bool exists = false; lock (ftpcLock) { exists = _sftpc.Exists(cpath); } return(exists); }
/// <summary> /// Does the specified path exist on the remote folder? /// </summary> public bool Exists(string cpath) { if (FTP) { return(_ftpc.Exists(cpath)); } else { return(_sftpc.Exists(cpath)); } }
public bool Exists(string path) { if (FTP) { return(ftpc.Exists(path)); } else { return(sftpc.Exists(path)); } }