/** * Method deleteDirTap will recursively delete all files referenced by the given DirTap. * * @param dirTap the directory to delete */ public static boolean deleteDirTap( DirTap dirTap, Properties conf ) throws IOException { deleteChildren( dirTap.getPath(), dirTap.getChildIdentifiers( conf ) ); Files.deleteIfExists( dirTap.getPath() ); return true; }
@Override public boolean deleteResource( Properties conf ) throws IOException { String[] childIdentifiers = ( (FileTap) parent ).getChildIdentifiers( conf, Integer.MAX_VALUE, false ); if( childIdentifiers.length == 0 ) return deleteParent( conf ); DirTap.deleteChildren( Paths.get( parent.getIdentifier() ), childIdentifiers ); return deleteParent( conf ); }