Ejemplo n.º 1
0
        /// <summary>
        ///     Returns the file size of the file in the given bath, in both SFTP and FTP
        /// </summary>
        /// <param name="path">The path to the file</param>
        /// <returns>The file's size</returns>
        public override long SizeOf(string path)
        {
            long size = -1;

            lock (ftpcLock)
            {
                size = _sftpc.GetAttributes(path).Size;
            }

            return(size);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the file size of the file in the given bath, in both SFTP and FTP
 /// </summary>
 /// <param name="path">The path to the file</param>
 /// <returns>The file's size</returns>
 public long SizeOf(string path)
 {
     return((FTP) ? _ftpc.GetFileSize(path) : _sftpc.GetAttributes(path).Size);
 }