Exemple #1
0
 private void mv(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: mv <old filename> <new filename>");
     }
     else
     {
         Console.WriteLine("I'd rename that file if I was implemented yet.");
     }
 }
Exemple #2
0
 private void mkdir(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: mkdir <remote directory>");
     }
     else
     {
         Console.WriteLine("I'd make that directory if I was implemented yet.");
     }
 }
Exemple #3
0
 private void rm(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: rm <remote file>");
     }
     else
     {
         Console.WriteLine("I'd remove that file if I was implemented yet.");
     }
 }
Exemple #4
0
 private void ul(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: ul <local file> <remote file>");
     }
     else
     {
         Console.WriteLine("I'd upload that file if I was implemented yet.");
     }
 }
Exemple #5
0
 private void ls(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: ls <directory path>");
     }
     else
     {
         Console.WriteLine(c.getArgs()[0]);
         Console.WriteLine(
             ftp.pwdSimple(c.getArgs()[0])
             );
     }
 }
Exemple #6
0
 private void dl(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: dl <remote file> <local file>");
     }
     else
     {
         string remote = c.getArgs()[0].Replace(" ", "%20");
         string local = c.getArgs()[1];
         Console.WriteLine("Downloading " + remote + " to " + local);
         ftp.download(remote, local);
         //Console.WriteLine("I'd download that file if I was implemented yet.");
     }
 }
Exemple #7
0
 private void dl(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: dl <remote file> <local file>");
     }
     else
     {
         string remote = c.getArgs()[0].Replace(" ", "%20");
         string local  = c.getArgs()[1];
         Console.WriteLine("Downloading " + remote + " to " + local);
         ftp.download(remote, local);
         //Console.WriteLine("I'd download that file if I was implemented yet.");
     }
 }
Exemple #8
0
 private bool quit(Command c)
 {
     if (c.getArgs() != null)
     {
         Console.WriteLine("Quit what?");
         return(false);
     }
     return(true);
 }
Exemple #9
0
 private void ls(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: ls <directory path>");
     }
     else
     {
         Console.WriteLine(c.getArgs()[0]);
         Console.WriteLine(
             ftp.pwdSimple(c.getArgs()[0])
             );
     }
 }
Exemple #10
0
 private void ul(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: ul <local file> <remote file>");
     }
     else
     {
         Console.WriteLine("I'd upload that file if I was implemented yet.");
     }
 }
Exemple #11
0
 private void rm(Command c)
 {
     if(c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: rm <remote file>");
     }
     else
     {
         Console.WriteLine("I'd remove that file if I was implemented yet.");
     }
 }
Exemple #12
0
 private bool quit(Command c)
 {
     if (c.getArgs() != null)
     {
         Console.WriteLine("Quit what?");
         return false;
     }
     return true;
 }
Exemple #13
0
 private void mv(Command c)
 {
     if (c.getArgs() == null || c.getArgs().Length != 2)
     {
         Console.WriteLine("Usage: mv <old filename> <new filename>");
     }
     else
     {
         Console.WriteLine("I'd rename that file if I was implemented yet.");
     }
 }
Exemple #14
0
 private void mkdir(Command c)
 {
     if(c.getArgs() == null || c.getArgs().Length != 1)
     {
         Console.WriteLine("Usage: mkdir <remote directory>");
     }
     else
     {
         Console.WriteLine("I'd make that directory if I was implemented yet.");
     }
 }