internal void RemoveFileOnServer(FtpClient ftpClient, DFtpFile file)
        {
            DFtpAction action = new DeleteFileRemoteAction(ftpClient, file.GetFullPath(), file);

            DFtpResult result = action.Run();

            return;
        }
        internal void RemoveFileOnServer(FtpClient ftpClient, DFtpFile file, String remoteDirectory = "/")
        {
            DFtpFile remoteSelection = file;

            DFtpAction action = new DeleteFileRemoteAction(ftpClient, remoteDirectory, remoteSelection);

            DFtpResult result = action.Run();

            return;
        }
Esempio n. 3
0
        internal void RemoveFileOnServer(FtpClient ftpClient, DFtpFile file)
        {
            DFtpFile remoteSelection = file;

            DFtpAction action = new DeleteFileRemoteAction(ftpClient, test_Dir, remoteSelection);

            DFtpResult result = action.Run();

            return;
        }
Esempio n. 4
0
        public DFtpResult Go()
        {
            // Create the action
            // Initialize it with the info we've collected
            DFtpAction action = new DeleteFileRemoteAction(Client.ftpClient, Client.remoteDirectory, Client.remoteSelection);

            // Carry out the action and get the result
            DFtpResult result = action.Run();

            // Nullify the selection if successful.
            if (result.Type == DFtpResultType.Ok)
            {
                IOHelper.Message("The file '" + Client.remoteSelection.GetName() + "' was deleted successfully.");
                Client.remoteSelection = null;
            }

            return(result);
        }