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

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

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

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

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI()
    .toURL();
}
origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI()
    .toURL();
}
origin: biz.aQute.bnd/biz.aQute.repository

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI()
    .toURL();
}
origin: biz.aQute.bnd/bndlib

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI().toURL();
}
origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI()
    .toURL();
}
origin: biz.aQute/bndlib

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI().toURL();
}
origin: biz.aQute.bnd/biz.aQute.bnd

public static URL toURL(String s, File base) throws MalformedURLException {
  int n = s.indexOf(':');
  if (n > 0 && n < 10) {
    // is url
    return new URL(s);
  }
  return getFile(base, s).toURI()
    .toURL();
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public static File getBasedFile(File base, String file) throws IOException {
  base = base.getCanonicalFile();
  File child = getFile(base, file);
  if (child.getCanonicalPath()
    .startsWith(base.getCanonicalPath())) {
    return child;
  }
  throw new IOException("The file " + child + " is outside of the base " + base);
}
origin: biz.aQute.bnd/bndlib

public String _osfile(String args[]) {
  verifyCommand(args, _fileHelp, null, 3, 3);
  File base = new File(args[1]);
  File f = IO.getFile(base, args[2]);
  return f.getAbsolutePath();
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public String _osfile(String args[]) {
  verifyCommand(args, _fileHelp, null, 3, 3);
  File base = new File(args[1]);
  File f = IO.getFile(base, args[2]);
  return f.getAbsolutePath();
}
origin: biz.aQute.bnd/bndlib

public File getDir(String file, String notfound) {
  File f = IO.getFile(base, file);
  if (!f.isDirectory() && notfound != null) {
    error(notfound, f.getAbsolutePath());
    f = null;
  }
  return f;
}
origin: biz.aQute/bndlib

public String _osfile(String args[]) {
  verifyCommand(args, _fileHelp, null, 3, 3);
  File base = new File(args[1]);
  File f = IO.getFile(base, args[2]);
  return f.getAbsolutePath();
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public String _fileuri(String args[]) throws Exception {
  Macro.verifyCommand(args, _fileuri, null, 2, 2);
  File f = IO.getFile(getBase(), args[1])
    .getCanonicalFile();
  return f.toURI()
    .toString();
}
origin: biz.aQute.bnd/bndlib

/**
 * Return a file relative to the base.
 */
public File getFile(String file, String notfound) {
  File f = IO.getFile(getBase(), file);
  if (!f.isFile() && notfound != null) {
    error(notfound, f.getAbsolutePath());
    f = null;
  }
  return f;
}
public File getDir(String file, String notfound) {
origin: biz.aQute.bnd/bndlib

public void checkStructure() {
  if (!buildDir.isDirectory())
    error("No directory for cnf %s", buildDir);
  else {
    File build = IO.getFile(buildDir, "build.bnd");
    if (build.isFile()) {
      error("No build.bnd file in %s", buildDir);
    }
  }
}
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/bnd

/**
 * Delete a cache entry
 */
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/bndlib

/**
 * Delete a cache entry
 */
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.bndlib

private Workspace(WorkspaceLayout layout) throws Exception {
  super(getDefaults());
  this.layout = layout;
  setBuildDir(IO.getFile(BND_DEFAULT_WS, CNFDIR));
  projects = new ProjectTracker(this);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void checkStructure() {
  if (!getBuildDir().isDirectory())
    error("No directory for cnf %s", getBuildDir());
  else {
    File build = IO.getFile(getBuildDir(), BUILDFILE);
    if (build.isFile()) {
      error("No %s file in %s", BUILDFILE, getBuildDir());
    }
  }
}
aQute.lib.ioIOgetFile

Popular methods of IO

  • copy
  • collect
  • deleteWithException
    Deletes the specified path. Folders are recursively deleted. Throws exception if any of the files co
  • reader
  • store
  • writer
  • delete
    Deletes the specified path. Folders are recursively deleted. If file(s) cannot be deleted, no feedba
  • 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

  • Making http post requests using okhttp
  • getResourceAsStream (ClassLoader)
  • setScale (BigDecimal)
  • findViewById (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top PhpStorm 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