Codota Logo
FsController.unlink
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: net.java.truevfs/truevfs-kernel-spec

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

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

void delete(TPath path) throws IOException {
  getController().unlink(path.getAccessPreferences(), path.getNodeName());
}
origin: net.java.truevfs/truevfs-access

/**
 * Deletes the given file or directory.
 * If the file is a directory, it must be empty.
 *
 * @param  file the file or directory.
 *         Note that although this just needs to be a plain {@code File}
 *         object, archive files and entries are only supported for
 *         instances of {@code TFile}.
 * @throws IOException if any I/O error occurs.
 * @see    <a href="#bulkIOMethods">Bulk I/O Methods</a>
 */
@FsAssertion(atomic=YES, consistent=YES, isolated=YES)
@SuppressWarnings("AccessingNonPublicFieldOfAnotherObject")
public static void rm(File file) throws IOException {
  if (file instanceof TFile) {
    TFile tfile = (TFile) file;
    if (null != tfile.innerArchive) {
      tfile.innerArchive.getController().unlink(
          getAccessPreferences(), tfile.getNodeName());
      return;
    }
    file = tfile.file;
  }
  if (!file.delete())
    throw new FileSystemException(file.getPath(), null, "Cannot delete!");
}
origin: net.java.truevfs/truevfs-comp-zipdriver

@Override
public final void unlink(
    final BitField<FsAccessOption> options,
    final FsNodeName name)
throws IOException {
  try {
    controller.unlink(options, name);
  } catch (final ControlFlowException ex) {
    // If the exception is caused by a key exception, then throw this
    // cause instead in order to avoid treating the target archive file
    // like a false positive and routing this operation to the parent
    // file system.
    // This prevents the application from inadvertently deleting an
    // encrypted ZIP file just because the user cancelled key prompting.
    final IOException keyEx = findKeyException(ex);
    if (null == keyEx)
      throw ex;
    throw keyEx;
  }
  final FsModel model = getModel();
  final URI mpu = driver.mountPointUri(model);
  final URI fsu = driver.fileSystemUri(model, name.toString());
  if (!fsu.equals(mpu) || name.isRoot())
    keyManager().unlink(fsu);
}
net.java.truevfs.kernel.specFsControllerunlink

Javadoc

Removes the named file system node from the file system. If the named file system node is a directory, it must be empty.

Popular methods of FsController

  • node
    Returns the file system node for the given name or nullif it doesn't exist. Modifying the returned n
  • checkAccess
    Checks if the file system node for the given name exists when constrained by the given access option
  • 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
  • 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

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • setContentView (Activity)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now