/** * Returns the Trash object associated with this shell. * @return Path to the trash * @throws IOException upon error */ public Path getCurrentTrashDir() throws IOException { return getTrash().getCurrentTrashDir(); }
/** * Returns the current trash location for the path specified * @param path to be deleted * @return path to the trash * @throws IOException */ public Path getCurrentTrashDir(Path path) throws IOException { return getTrash().getCurrentTrashDir(path); }
/** * Returns the Trash object associated with this shell. */ public Path getCurrentTrashDir() throws IOException { return trash.getCurrentTrashDir(); }
/** * Returns the Trash object associated with this shell. */ public Path getCurrentTrashDir() { return trash.getCurrentTrashDir(); }
/** * Returns the Trash object associated with this shell. * @return Path to the trash * @throws IOException upon error */ public Path getCurrentTrashDir() throws IOException { return getTrash().getCurrentTrashDir(); }
/** * Returns the Trash object associated with this shell. */ public Path getCurrentTrashDir() throws IOException{ return getTrash().getCurrentTrashDir(); }
/** * Returns the current trash location for the path specified * @param path to be deleted * @return path to the trash * @throws IOException */ public Path getCurrentTrashDir(Path path) throws IOException { return getTrash().getCurrentTrashDir(path); }
/** * Returns the Trash object associated with this shell. * @return Path to the trash * @throws IOException upon error */ public Path getCurrentTrashDir() throws IOException { return getTrash().getCurrentTrashDir(); }
/** * Returns the Trash object associated with this shell. * @return Path to the trash * @throws IOException upon error */ public Path getCurrentTrashDir() throws IOException { return getTrash().getCurrentTrashDir(); }
/** * Returns the Trash object associated with this shell. * @return Path to the trash * @throws IOException upon error */ public Path getCurrentTrashDir() throws IOException { return getTrash().getCurrentTrashDir(); }
public static void trashNonDefaultFS(Configuration conf) throws IOException { conf.set(FS_TRASH_INTERVAL_KEY, "10"); // 10 minute // attempt non-default FileSystem trash { final FileSystem lfs = FileSystem.getLocal(conf); Path p = TEST_DIR; Path f = new Path(p, "foo/bar"); if (lfs.exists(p)) { lfs.delete(p, true); } try { f = writeFile(lfs, f); FileSystem.closeAll(); FileSystem localFs = FileSystem.get(URI.create("file:///"), conf); Trash lTrash = new Trash(localFs, conf); lTrash.moveToTrash(f.getParent()); checkTrash(localFs, lTrash.getCurrentTrashDir(), f); } finally { if (lfs.exists(p)) { lfs.delete(p, true); } } } }
if (success) { System.out.println("Moved: '" + p + "' to trash at: " + trash.getCurrentTrashDir() );
if (success) { System.out.println("Moved: '" + p + "' to trash at: " + trash.getCurrentTrashDir() );
if (success) { System.out.println("Moved: '" + p + "' to trash at: " + trash.getCurrentTrashDir() );
public static void trashNonDefaultFS(Configuration conf) throws IOException { conf.setLong(FS_TRASH_INTERVAL_KEY, 10); // 10 minute // attempt non-default FileSystem trash { final FileSystem lfs = FileSystem.getLocal(conf); Path p = TEST_DIR; Path f = new Path(p, "foo/bar"); if (lfs.exists(p)) { lfs.delete(p, true); } try { writeFile(lfs, f, 10); FileSystem.closeAll(); FileSystem localFs = FileSystem.get(URI.create("file:///"), conf); Trash lTrash = new Trash(localFs, conf); lTrash.moveToTrash(f.getParent()); checkTrash(localFs, lTrash.getCurrentTrashDir(), f); } finally { if (lfs.exists(p)) { lfs.delete(p, true); } } } }
public static void trashNonDefaultFS(Configuration conf) throws IOException { conf.setLong(FS_TRASH_INTERVAL_KEY, 10); // 10 minute // attempt non-default FileSystem trash { final FileSystem lfs = FileSystem.getLocal(conf); Path p = TEST_DIR; Path f = new Path(p, "foo/bar"); if (lfs.exists(p)) { lfs.delete(p, true); } try { writeFile(lfs, f, 10); FileSystem.closeAll(); FileSystem localFs = FileSystem.get(URI.create("file:///"), conf); Trash lTrash = new Trash(localFs, conf); lTrash.moveToTrash(f.getParent()); checkTrash(localFs, lTrash.getCurrentTrashDir(), f); } finally { if (lfs.exists(p)) { lfs.delete(p, true); } } } }
login(SUPERUSER); Trash trash = new Trash(fs, conf); Path trashRoot = trash.getCurrentTrashDir(); while(true) { trashRoot = trashRoot.getParent();