@Override public void delete( final Path path, final DeleteOption... options ) throws IllegalArgumentException, NoSuchFileException, DirectoryNotEmptyException, IOException, SecurityException { Files.delete( path, options ); }
@Override public synchronized void delete( final Path path, final DeleteOption... options ) throws IllegalArgumentException, NoSuchFileException, DirectoryNotEmptyException, IOException, SecurityException { Files.delete( path, options ); try { Files.deleteIfExists( dot( path ), options ); } catch ( Exception ex ) { } if ( path instanceof AttrHolder ) { ( (AttrHolder) path ).getAttrStorage().clear(); } }
@After public void clearDown() { for (final Path p : pathsToDelete) { Files.delete(p); } }
@After public void clearDown() { for (final Path p : pathsToDelete) { Files.delete(p); } }
@Override public synchronized Path move( final Path source, final Path target, final CopyOption... options ) throws UnsupportedOperationException, FileAlreadyExistsException, DirectoryNotEmptyException, AtomicMoveNotSupportedException, IOException, SecurityException { if ( Files.exists( dot( source ) ) ) { Files.move( dot( source ), dot( target ), forceBuildOptions( options ) ); } else if ( Files.exists( dot( target ) ) ) { Files.delete( dot( target ) ); } final Path result = Files.move( source, target, options ); return result; }
@Override public synchronized Path copy( final Path source, final Path target, final CopyOption... options ) throws UnsupportedOperationException, FileAlreadyExistsException, DirectoryNotEmptyException, IOException, SecurityException { if ( Files.exists( dot( source ) ) ) { Files.copy( dot( source ), dot( target ), forceBuildOptions( options ) ); } else if ( Files.exists( dot( target ) ) ) { Files.delete( dot( target ) ); } final Path result = Files.copy( source, target, buildOptions( options ) ); return result; }