Tabnine Logo
FsController.checkAccess
Code IndexAdd Tabnine to your IDE (free)

How to use
checkAccess
method
in
net.java.truevfs.kernel.spec.FsController

Best Java code snippets using net.java.truevfs.kernel.spec.FsController.checkAccess (Showing top 8 results out of 315)

origin: net.java.truevfs/truevfs-kernel-spec

@Override
public void checkAccess(
    BitField<FsAccessOption> options,
    FsNodeName name,
    BitField<Access> types)
throws IOException {
  controller.checkAccess(options, name, types);
}
origin: net.java.truevfs/truevfs-kernel-spec

@Override
public final void checkAccess(BitField<FsAccessOption> options, FsNodeName name, BitField<Access> types) throws IOException {
  controller.checkAccess(map(options), name, types);
}
origin: net.java.truevfs/truevfs-access

@Override
@FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE)
public boolean canRead() {
  if (null != innerArchive) {
    try {
      innerArchive.getController().checkAccess(
          getAccessPreferences(), getNodeName(),
          READ_ACCESS);
      return true;
    } catch (IOException ex) {
      return false;
    }
  }
  return file.canRead();
}
origin: net.java.truevfs/truevfs-access

@Override
@FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE)
public boolean canWrite() {
  if (null != innerArchive) {
    try {
      innerArchive.getController().checkAccess(
          getAccessPreferences(), getNodeName(),
          WRITE_ACCESS);
      return true;
    } catch (IOException ex) {
      return false;
    }
  }
  return file.canWrite();
}
origin: net.java.truevfs/truevfs-access

@Override
@FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE)
public boolean canExecute() {
  if (null != innerArchive) {
    try {
      innerArchive.getController().checkAccess(
          getAccessPreferences(), getNodeName(),
          EXECUTE_ACCESS);
      return true;
    } catch (IOException ex) {
      return false;
    }
  }
  return file.canExecute();
}
origin: net.java.truevfs/truevfs-access

/**
 * {@inheritDoc}
 *
 * @see <a href="#falsePositives">Detecting Archive Paths and False Positives</a>
 */
@Override
@FsAssertion(atomic=YES, consistent=YES, isolated=YES, durable=NOT_APPLICABLE)
public boolean exists() {
  // DONT test existance of getNodeName() in enclArchive because
  // it doesn't need to exist - see
  // http://java.net/jira/browse/TRUEZIP-136 .
  if (null != innerArchive) {
    try {
      innerArchive.getController().checkAccess(
          getAccessPreferences(), getNodeName(),
          NO_ACCESS);
      return true;
    } catch (IOException ex) {
      return false;
    }
  }
  return file.exists();
}
origin: net.java.truevfs/truevfs-access

void checkAccess(final TPath path, final AccessMode... modes)
throws IOException {
  final FsNodeName name = path.getNodeName();
  final BitField<FsAccessOption> options = path.getAccessPreferences();
  final BitField<Access> types = types(modes);
  getController().checkAccess(options, name, types);
}
origin: net.java.truevfs/truevfs-comp-zipdriver

@Override
public void checkAccess(
    final BitField<FsAccessOption> options, final FsNodeName name, final BitField<Access> types)
throws IOException {
  try {
    controller.checkAccess(options, name, types);
  } catch (final ControlFlowException ex) {
    if (!name.isRoot() || null == findKeyException(ex))
      throw ex;
    getParent().checkAccess(
        options, getModel()
               .getMountPoint()
               .getPath()
               .resolve(name)
               .getNodeName(),
        types);
  }
}
net.java.truevfs.kernel.specFsControllercheckAccess

Javadoc

Checks if the file system node for the given name exists when constrained by the given access options and permits the given access types.

Popular methods of FsController

  • node
    Returns the file system node for the given name or nullif it doesn't exist. Modifying the returned n
  • getModel
    Returns the file system model.
  • output
    Returns an output socket for writing the contents of the node addressed by the given name to the fil
  • unlink
    Removes the named file system node from the file system. If the named file system node is a director
  • getParent
    Returns the controller for the parent file system or null if and only if this file system is not fed
  • input
    Returns an input socket for reading the contents of the file system node addressed by the given name
  • make
    Creates or replaces and finally links a chain of one or more entries for the given node name into th
  • setReadOnly
    Sets the named file system node as read-only. This method will fail for typical archive file system
  • setTime
    Makes an attempt to set the last access time of all types in the given bit field for the file system
  • sync
    Commits all unsynchronized changes to the contents of this file system to its parent file system, re

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
  • startActivity (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now