public static Path copy( final Path source, final Path target, final CopyOption... options ) throws UnsupportedOperationException, FileAlreadyExistsException, DirectoryNotEmptyException, IOException, SecurityException { checkNotNull( "source", source ); checkNotNull( "target", target ); final FileSystemProvider provider = providerOf( source ); if ( providerOf( target ) == provider ) { provider.copy( source, target, options ); return target; } throw new UnsupportedOperationException( "can't copy from different providers" ); }