@Test public void rmTest() throws IOException { StringBuilder toCompare = new StringBuilder(); mFsShell.mkdir(new String[] { "mkdir", "/testFolder1/testFolder2/testFile2" }); toCompare .append(getCommandOutput(new String[] { "mkdir", "/testFolder1/testFolder2/testFile2" })); Assert.assertNotNull(mTfs.getFile("/testFolder1")); Assert.assertNotNull(mTfs.getFile("/testFolder1/testFolder2")); Assert.assertNotNull(mTfs.getFile("/testFolder1/testFolder2/testFile2")); mFsShell.rm(new String[] { "rm", "/testFolder1/testFolder2/testFile2" }); toCompare .append(getCommandOutput(new String[] { "rm", "/testFolder1/testFolder2/testFile2" })); Assert.assertEquals(toCompare.toString(), mOutput.toString()); Assert.assertNotNull(mTfs.getFile("/testFolder1")); Assert.assertNotNull(mTfs.getFile("/testFolder1/testFolder2")); Assert.assertNull(mTfs.getFile("/testFolder1/testFolder2/testFile2")); mFsShell.rm(new String[] { "rm", "/testFolder1" }); toCompare.append(getCommandOutput(new String[] { "rm", "/testFolder1" })); Assert.assertEquals(toCompare.toString(), mOutput.toString()); Assert.assertNull(mTfs.getFile("/testFolder1")); Assert.assertNull(mTfs.getFile("/testFolder1/testFolder2")); Assert.assertNull(mTfs.getFile("/testFolder1/testFolder2/testFile2")); }
public int rm(String argv[]) throws IOException { if (argv.length != 2) { System.out.println("Usage: tfs rm <path>"); return -1; } String path = argv[1]; String file = Utils.getFilePath(path); TachyonFS tachyonClient = TachyonFS.get(Utils.validatePath(path)); if (tachyonClient.delete(file, true)) { System.out.println(file + " has been removed"); return 0; } else { return -1; } }
TFsShell { public int rm(String argv[]) throws IOException { if (argv.length != 2) { System.out.println("Usage: tfs rm <path>"); return -1; } String path = argv[1]; String file = Utils.getFilePath(path); TachyonFS tachyonClient = TachyonFS.get(Utils.validatePath(path)); if (tachyonClient.delete(file, true)) { System.out.println(file + " has been removed"); return 0; } else { return -1; } } }
TFsShell { public int rm(String argv[]) throws IOException { if (argv.length != 2) { System.out.println("Usage: tfs rm <path>"); return -1; } String path = argv[1]; String file = Utils.getFilePath(path); TachyonFS tachyonClient = TachyonFS.get(Utils.validatePath(path)); if (tachyonClient.delete(file, true)) { System.out.println(file + " has been removed"); return 0; } else { return -1; } }  }
TFsShell { public int rm(String argv[]) throws IOException { if (argv.length != 2) { System.out.println("Usage: tfs rm <path>"); return -1; } String path = argv[1]; String file = Utils.getFilePath(path); TachyonFS tachyonClient = TachyonFS.get(Utils.validatePath(path)); if (tachyonClient.delete(file, true)) { System.out.println(file + " has been removed"); return 0; } else { return -1; } }  static void main(String argv[]); int cat(String argv[]); int copyFromLocal(String argv[]); int copyToLocal(String argv[]); int count(String argv[]); int fileinfo(String argv[]); int location(String argv[]); int ls(String argv[]); int lsr(String argv[]); int mkdir(String argv[]); int pin(String argv[]); int unpin(String argv[]); void printUsage(); int rename(String argv[]); int report(String argv[]); int request(String argv[]); int rm(String argv[]); int run(String argv[]); int tail(String argv[]); int touch(String argv[]); }
TFsShell { public int rm(String argv[]) throws IOException { if (argv.length != 2) { System.out.println("Usage: tfs rm <path>"); return -1; } String path = argv[1]; String file = Utils.getFilePath(path); TachyonFS tachyonClient = TachyonFS.get(Utils.validatePath(path)); if (tachyonClient.delete(file, true)) { System.out.println(file + " has been removed"); return 0; } else { return -1; } }  static void main(String argv[]); int cat(String argv[]); int copyFromLocal(String argv[]); int copyToLocal(String argv[]); int count(String argv[]); int fileinfo(String argv[]); int location(String argv[]); int ls(String argv[]); int lsr(String argv[]); int mkdir(String argv[]); int pin(String argv[]); int unpin(String argv[]); void printUsage(); int rename(String argv[]); int report(String argv[]); int request(String argv[]); int rm(String argv[]); int run(String argv[]); int tail(String argv[]); int touch(String argv[]);  }