Beispiel #1
0
        private void NewFolderToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var FolderToCreate = Interaction.InputBox("Folder Name", "New Folder");

            try
            {
                FtpConnection.SetWorkingDirectory(ServerFilesTree.SelectedNode.Tag.ToString());
                FtpConnection.CreateDirectory(FolderToCreate);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Creating Folder " + ex.Message);
                return;
            }
            finally
            {
                ServerFilesTree.SelectedNode.Nodes.Add(FolderToCreate);
                ServerFilesTree.SelectedNode.LastNode.Tag = ServerFilesTree.SelectedNode.Tag.ToString() + "/" + FolderToCreate;
                ServerFilesTree.SelectedNode.Expand();
            }
        }
Beispiel #2
0
 public void CreateDirectory(string newDirectoryPath)
 {
     _client.CreateDirectory(newDirectoryPath);
 }
 public override bool CreateDirectory(string remotePath)
 {
     _client.CreateDirectory(remotePath);
     return(true);
 }