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