@Override public AsynchronousFileChannel newAsynchronousFileChannel( Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { Path r = unroot(path); FileSystemProvider p = provider(r); return p.newAsynchronousFileChannel(r, options, executor, attrs); }
@Override public AsynchronousFileChannel newAsynchronousFileChannel(final Path path, final Set<? extends OpenOption> options, final ExecutorService executor, final FileAttribute<?>[] attrs) throws IOException { return wrapped().newAsynchronousFileChannel(unwrap(path), options, executor, attrs); }
@Override public AsynchronousFileChannel newAsynchronousFileChannel( Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { Path r = unroot(path); FileSystemProvider p = provider(r); return p.newAsynchronousFileChannel(r, options, executor, attrs); }
@Test @Category( { FileChannelT.class, AsynchronousFileChannel.class } ) public void testNewAsynchronousFileChannelOtherProvider() throws IOException { assertThatThrownBy( () -> FS.provider().newAsynchronousFileChannel( otherProviderAbsA(), Collections.<OpenOption> emptySet(), null ) ).isInstanceOf( ProviderMismatchException.class ); }
@Override public AsynchronousFileChannel newAsynchronousFileChannel(final Path path, final Set<? extends OpenOption> options, final ExecutorService executor, final FileAttribute<?>... attrs) throws IOException { if (isWriteAccess(options)) throw new ReadOnlyFileSystemException(); return delegate.newAsynchronousFileChannel(path, options, executor, attrs); }
@Override public AsynchronousFileChannel newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs) throws IOException { Path r = unroot(path); FileSystemProvider p = provider(r); return p.newAsynchronousFileChannel(r, options, executor, attrs); }