Beispiel #1
0
        /// <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));
            }
        }
Beispiel #2
0
 /// <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));
 }
Beispiel #3
0
        /// <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);
        }
Beispiel #4
0
 /// <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));
     }
 }
Beispiel #5
0
 public bool Exists(string path)
 {
     if (FTP)
     {
         return(ftpc.Exists(path));
     }
     else
     {
         return(sftpc.Exists(path));
     }
 }