FileSystemProvider.checkAccess
Code IndexAdd Codota to your IDE (free)

Best code snippets using java.nio.file.spi.FileSystemProvider.checkAccess(Showing top 11 results out of 315)

  • Common ways to obtain FileSystemProvider
private void myMethod () {
FileSystemProvider f =
  • Path path;path.getFileSystem().provider()
  • FileSystem fileSystem;fileSystem.provider()
  • Smart code suggestions by Codota
}
origin: org.apache.sshd/sshd-core

  @Override
  public RootedPath toRealPath(LinkOption... options) throws IOException {
    RootedPath absolute = toAbsolutePath();
    FileSystem fs = getFileSystem();
    FileSystemProvider provider = fs.provider();
    provider.checkAccess(absolute);
    return absolute;
  }
}
origin: org.apache.sshd/sshd-core

@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
  Path r = unroot(path);
  FileSystemProvider p = provider(r);
  p.checkAccess(r, modes);
}
origin: org.apache.lucene/lucene-test-framework

@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
 delegate.checkAccess(toDelegate(path), modes);
}
origin: org.elasticsearch/elasticsearch

/**
 * Ensures configured directory {@code path} exists.
 * @throws IOException if {@code path} exists, but is not a directory, not accessible, or broken symbolic link.
 */
static void ensureDirectoryExists(Path path) throws IOException {
  // this isn't atomic, but neither is createDirectories.
  if (Files.isDirectory(path)) {
    // verify access, following links (throws exception if something is wrong)
    // we only check READ as a sanity test
    path.getFileSystem().provider().checkAccess(path.toRealPath(), AccessMode.READ);
  } else {
    // doesn't exist, or not a directory
    try {
      Files.createDirectories(path);
    } catch (FileAlreadyExistsException e) {
      // convert optional specific exception so the context is clear
      IOException e2 = new NotDirectoryException(path.toString());
      e2.addSuppressed(e);
      throw e2;
    }
  }
}
origin: com.github.marschall/zipfilesystem-standalone

zfpath.getFileSystem().provider().checkAccess(zfpath, AccessMode.READ);
if (!Files.isWritable(zfpath))
  this.readOnly = true;
origin: org.apache.sshd/sshd-core

  @Override
  public SftpPath toRealPath(LinkOption... options) throws IOException {
    // TODO: handle links
    SftpPath absolute = toAbsolutePath();
    FileSystem fs = getFileSystem();
    FileSystemProvider provider = fs.provider();
    provider.checkAccess(absolute);
    return absolute;
  }
}
origin: de.schlichtherle.truezip/truezip-driver-file

        .checkAccess(entryFile, AccessMode.WRITE);
} else {
  createFile(entryFile);
origin: org.apache.sshd/sshd-core

@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
  Path r = unroot(path);
  FileSystemProvider p = provider(r);
  p.checkAccess(r, modes);
}
origin: org.apache.sshd/sshd-core

  @Override
  public SftpPath toRealPath(LinkOption... options) throws IOException {
    // TODO: handle links
    SftpPath absolute = toAbsolutePath();
    FileSystem fs = getFileSystem();
    FileSystemProvider provider = fs.provider();
    provider.checkAccess(absolute);
    return absolute;
  }
}
origin: org.apache.sshd/sshd-core

  @Override
  public RootedPath toRealPath(LinkOption... options) throws IOException {
    RootedPath absolute = toAbsolutePath();
    FileSystem fs = getFileSystem();
    FileSystemProvider provider = fs.provider();
    provider.checkAccess(absolute);
    return absolute;
  }
}
origin: org.apache.lucene/lucene-test-framework

@Override
public void checkAccess(Path path, AccessMode... modes) throws IOException {
 delegate.checkAccess(toDelegate(path), modes);
}
java.nio.file.spiFileSystemProvidercheckAccess

Popular methods of FileSystemProvider

  • getScheme
  • installedProviders
  • newFileSystem
  • newFileChannel
  • getPath
  • newDirectoryStream
  • move
  • newInputStream
  • copy
  • createDirectory
  • createLink
  • createSymbolicLink
  • createLink,
  • createSymbolicLink,
  • delete,
  • deleteIfExists,
  • getFileAttributeView,
  • getFileSystem,
  • isHidden,
  • isSameFile,
  • newAsynchronousFileChannel

Popular classes and methods

  • getSupportFragmentManager (FragmentActivity)
  • getSystemService (Context)
  • findViewById (Activity)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedImage (java.awt.image)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Proxy (java.net)
    This class represents a proxy setting, typically a type (http, socks) and a socket address. A Proxy
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)