コード例 #1
0
 /// <summary>
 /// Delete a file
 /// </summary>
 /// <param name="cpath">Path to the file</param>
 public void Remove(string cpath)
 {
     if (FTP)
     {
         _ftpc.DeleteFile(cpath);
     }
     else
     {
         _sftpc.Delete(cpath);
     }
 }
コード例 #2
0
        /// <summary>
        ///     Delete a file
        /// </summary>
        /// <param name="cpath">Path to the file</param>
        public override void Remove(string cpath)
        {
            CheckWorkingDirectory();


            try
            {
                lock (ftpcLock)
                {
                    var removedSpace = SizeOf(cpath);
                    _ftpc.DeleteFile(cpath);
                    Notifications.ChangeTrayText(MessageType.Size, null, -1 * removedSpace);
                }
            }
            catch (Exception) { }
        }