Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }
Beispiel #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])
             );
     }
 }
Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }
Beispiel #8
0
 private bool quit(Command c)
 {
     if (c.getArgs() != null)
     {
         Console.WriteLine("Quit what?");
         return(false);
     }
     return(true);
 }
Beispiel #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])
             );
     }
 }
Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }
Beispiel #12
0
 private bool quit(Command c)
 {
     if (c.getArgs() != null)
     {
         Console.WriteLine("Quit what?");
         return false;
     }
     return true;
 }
Beispiel #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.");
     }
 }
Beispiel #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.");
     }
 }