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

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

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

origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: biz.aQute.bnd/biz.aQute.bnd

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: org.osgi/osgi.enroute.configurer.simple.provider

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: biz.aQute.bnd/biz.aQute.repository

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: biz.aQute.bnd/biz.aQute.resolve

/**
 * Creates a symbolic link from {@code link} to the {@code target}, or
 * copies {@code target} to {@code link} if running on Windows.
 * <p>
 * Creating symbolic links on Windows requires administrator permissions, so
 * copying is a safer fallback. Copy only happens if timestamp and and file
 * length are different than target
 *
 * @param link the location of the symbolic link, or destination of the
 *            copy.
 * @param target the source of the symbolic link, or source of the copy.
 * @return {@code true} if the operation succeeds, {@code false} otherwise.
 */
public static boolean createSymbolicLinkOrCopy(File link, File target) {
  return createSymbolicLinkOrCopy(link.toPath(), target.toPath());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

IO.createSymbolicLinkOrCopy(linked, file);
origin: biz.aQute.bnd/biz.aQute.bnd

IO.createSymbolicLinkOrCopy(linked, file);
origin: biz.aQute.bnd/biz.aQute.bnd

File get(String bsn, Version version, Map<String, String> properties, DownloadListener... listeners)
  throws Exception {
  Resource resource = getBridge().get(bsn, version);
  if (resource == null)
    return null;
  ContentCapability contentCapability = ResourceUtils.getContentCapability(resource);
  if (contentCapability == null)
    return null;
  URI url = contentCapability.url();
  final File source = client.getCacheFileFor(url);
  final File link = new File(location, bsn + "-" + version + ".jar");
  IO.createSymbolicLinkOrCopy(link, source);
  Promise<File> go = client.build()
    .useCache(MAX_STALE)
    .async(url.toURL())
    .map(file -> link);
  if (listeners.length == 0)
    return go.getValue();
  new DownloadListenerPromise(reporter, name + ": get " + bsn + ";" + version + " " + url, go, listeners);
  return link;
}
origin: biz.aQute.bnd/biz.aQute.repository

File get(String bsn, Version version, Map<String, String> properties, DownloadListener... listeners)
  throws Exception {
  Resource resource = getBridge().get(bsn, version);
  if (resource == null)
    return null;
  ContentCapability contentCapability = ResourceUtils.getContentCapability(resource);
  if (contentCapability == null)
    return null;
  URI url = contentCapability.url();
  final File source = client.getCacheFileFor(url);
  final File link = new File(location, bsn + "-" + version + ".jar");
  IO.createSymbolicLinkOrCopy(link, source);
  Promise<File> go = client.build()
    .useCache(MAX_STALE)
    .async(url.toURL())
    .map(file -> link);
  if (listeners.length == 0)
    return go.getValue();
  new DownloadListenerPromise(reporter, name + ": get " + bsn + ";" + version + " " + url, go, listeners);
  return link;
}
origin: biz.aQute.bnd/biz.aQute.repository

File get(String bsn, Version version, Map<String, String> properties, DownloadListener... listeners)
  throws Exception {
  Resource resource = getBridge().get(bsn, version);
  if (resource == null)
    return null;
  ContentCapability contentCapability = ResourceUtils.getContentCapability(resource);
  if (contentCapability == null)
    return null;
  URI url = contentCapability.url();
  final File source = client.getCacheFileFor(url);
  final File link = new File(location, bsn + "-" + version + ".jar");
  IO.createSymbolicLinkOrCopy(link, source);
  Promise<File> go = client.build()
    .useCache(MAX_STALE)
    .async(url.toURL())
    .map(file -> link);
  if (listeners.length == 0)
    return go.getValue();
  new DownloadListenerPromise(reporter, name + ": get " + bsn + ";" + version + " " + url, go, listeners);
  return link;
}
origin: biz.aQute.bnd/biz.aQute.bnd

File get(String bsn, Version version, Map<String, String> properties, DownloadListener... listeners)
  throws Exception {
  Resource resource = getBridge().get(bsn, version);
  if (resource == null)
    return null;
  ContentCapability contentCapability = ResourceUtils.getContentCapability(resource);
  if (contentCapability == null)
    return null;
  URI url = contentCapability.url();
  final File source = client.getCacheFileFor(url);
  final File link = new File(location, bsn + "-" + version + ".jar");
  IO.createSymbolicLinkOrCopy(link, source);
  Promise<File> go = client.build()
    .useCache(MAX_STALE)
    .async(url.toURL())
    .map(file -> link);
  if (listeners.length == 0)
    return go.getValue();
  new DownloadListenerPromise(reporter, name + ": get " + bsn + ";" + version + " " + url, go, listeners);
  return link;
}
aQute.lib.ioIOcreateSymbolicLinkOrCopy

Javadoc

Creates a symbolic link from link to the target, or copies target to link if running on Windows.

Creating symbolic links on Windows requires administrator permissions, so copying is a safer fallback. Copy only happens if timestamp and and file length are different than target

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
  • 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
  • isSymbolicLink,
  • stream,
  • traverse,
  • close,
  • createSymbolicLink,
  • createTempFile,
  • decode,
  • mkdirs,
  • normalizePath

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • getApplicationContext (Context)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Path (java.nio.file)
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JCheckBox (javax.swing)
  • Top Vim 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