Tabnine Logo
IO.delete
Code IndexAdd Tabnine to your IDE (free)

How to use
delete
method
in
aQute.lib.io.IO

Best Java code snippets using aQute.lib.io.IO.delete (Showing top 20 results out of 315)

origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void close() throws IOException {
  /*
   * Allow original buffer to be garbage collected and prevent it being
   * remapped for this FileResouce.
   */
  buffer = CLOSED;
  if (deleteOnClose)
    IO.delete(file);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void remove() {
  if (dir.getParentFile() != null) {
    IO.delete(dir);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Deletes the specified file. Folders are recursively deleted.<br>
 * If file(s) cannot be deleted, no feedback is provided (fail silently).
 *
 * @param file file to be deleted
 */
public static void delete(File file) {
  delete(file.toPath());
}
origin: biz.aQute/bndlib

public void remove() {
  if (dir.getParentFile() != null) {
    IO.delete(dir);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

  @Override
  public void run() {
    IO.delete(f);
    if (f.getParentFile()
      .list().length == 0)
      IO.delete(f.getParentFile());
    afterAction(f, "delete");
  };
});
origin: biz.aQute.bnd/bndlib

  public void run() {
    IO.delete(f);
    if (f.getParentFile().list().length == 0)
      IO.delete(f.getParentFile());
    afterAction(f, "delete");
  };
});
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void clear() {
  data = new Data();
  IO.delete(where);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private void doRoot(Project p, File root) throws IOException {
  if (!root.isFile()) {
    IO.delete(root);
    copy("rootpom.xml", "../pom.xml", p);
  }
}
origin: biz.aQute.bnd/bndlib

private void doRoot(Project p, File root) throws IOException {
  if( !root.isFile()) {
    IO.delete(root);
    copy("rootpom.xml", "../pom.xml", p);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void close() {
  IO.close(printer);
  IO.delete(file);
}
origin: biz.aQute.bnd/biz.aQute.repository

@Override
public void run() {
  File dir = repo.storage.toLocalFile(archive)
    .getParentFile();
  IO.delete(dir);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Delete a cache entry
 */
@Override
public boolean deleteCache(byte[] id) throws Exception {
  File dir = IO.getFile(cache, Hex.toHexString(id));
  if (dir.isDirectory()) {
    IO.delete(dir);
    return true;
  }
  return false;
}
origin: biz.aQute.bnd/biz.aQute.repository

@Override
public boolean exists(Archive archive) throws Exception {
  File file = File.createTempFile("pom", ".xml");
  try {
    File result = getFile(archive.getPomArchive(), file);
    return result != null;
  } catch (Exception e) {
    return false;
  } finally {
    IO.delete(file);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public boolean removePlugin(String alias) {
  File ext = getFile(Workspace.CNFDIR + "/" + Workspace.EXT);
  File f = new File(ext, alias + ".bnd");
  if (!f.exists()) {
    error("No such plugin %s", alias);
    return false;
  }
  IO.delete(f);
  refresh();
  return true;
}
origin: biz.aQute.bnd/bndlib

public boolean removePlugin(String alias) {
  File ext = getFile(Workspace.CNFDIR + "/" + Workspace.EXT);
  File f = new File(ext, alias + ".bnd");
  if ( !f.exists()) {
    error("No such plugin %s", alias);
    return false;
  }
  
  IO.delete(f);
  
  refresh();    
  return true;
}
origin: biz.aQute.bnd/bnd

public boolean removePlugin(String alias) {
  File ext = getFile(Workspace.CNFDIR + "/" + Workspace.EXT);
  File f = new File(ext, alias + ".bnd");
  if ( !f.exists()) {
    error("No such plugin %s", alias);
    return false;
  }
  
  IO.delete(f);
  
  refresh();    
  return true;
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void write(File file) throws Exception {
  check();
  try (OutputStream out = IO.outputStream(file)) {
    write(out);
  } catch (Exception t) {
    IO.delete(file);
    throw t;
  }
  file.setLastModified(lastModified);
}
origin: biz.aQute.bnd/biz.aQute.bnd

Releaser(MavenRepository home, Revision revision, MavenBackingRepository repo, Properties context)
  throws Exception {
  this.home = home;
  this.revision = revision;
  this.repo = repo;
  this.context = context;
  this.dir = home.toLocalFile(revision.path);
  IO.delete(this.dir);
  check();
  IO.mkdirs(this.dir);
}
origin: biz.aQute.bnd/biz.aQute.bnd

private void save(Release releaser, Revision revision, Jar jar) throws Exception {
  String classifier = jar.getName(); // jar name is classifier
  String extension = "jar";
  File tmp = File.createTempFile(classifier, extension);
  try {
    jar.write(tmp);
    releaser.add(revision.archive(extension, classifier), tmp);
  } finally {
    IO.delete(tmp);
  }
}
origin: biz.aQute.bnd/bnd

  public void remove() throws Exception {
    getWorkspace().removeProject(this);
    IO.delete(getBase());
  }
}
aQute.lib.ioIOdelete

Javadoc

Deletes the specified file. Folders are recursively deleted.
If file(s) cannot be deleted, no feedback is provided (fail silently).

Popular methods of IO

  • copy
  • collect
  • getFile
  • deleteWithException
    Deletes the specified path. Folders are recursively deleted. Throws exception if any of the files co
  • reader
  • store
  • writer
  • read
  • rename
    Renames from to to replacing the target file if necessary.
  • isSymbolicLink
  • stream
  • traverse
  • stream,
  • traverse,
  • close,
  • createSymbolicLink,
  • createSymbolicLinkOrCopy,
  • createTempFile,
  • decode,
  • mkdirs,
  • normalizePath

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • getContentResolver (Context)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JFrame (javax.swing)
  • Best IntelliJ plugins
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