congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FileUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
FileUtils
in
com.atlassian.plugin.util

Best Java code snippets using com.atlassian.plugin.util.FileUtils (Showing top 2 results out of 315)

origin: com.atlassian.plugins/atlassian-plugins-osgi

public void start(final BundleContext context) throws Exception {
  bundleContext = context;
  final ServiceReference ref = context.getServiceReference(PackageAdmin.class.getName());
  packageAdmin = (PackageAdmin) context.getService(ref);
  context.addBundleListener(this);
  context.addFrameworkListener(this);
  loadHostComponents(registrar);
  if (null != frameworkBundlesUrl) {
    conditionallyExtractZipFile(frameworkBundlesUrl, frameworkBundlesDir);
  }
  installFrameworkBundles();
  // unregister the optional instrumentation service
  instrumentationServiceReference.ifPresent(ServiceRegistration::unregister);
  instrumentationServiceReference = Optional.empty();
  // register the instrumentation service if it's present, keeping aware that InstrumentRegistry might not be in the class loader
  final Optional instrumentRegistry = PluginSystemInstrumentation.instance().getInstrumentRegistry();
  if (instrumentRegistry.isPresent()) {
    instrumentationServiceReference = Optional.of(context.registerService(PluginSystemInstrumentation.INSTRUMENT_REGISTRY_CLASS, instrumentRegistry.get(), null));
  } else {
    instrumentationServiceReference = Optional.empty();
  }
}
origin: com.atlassian.plugins/atlassian-plugins-core

private static Scanner buildZipScanner(final URL url, final File pluginPath) {
  // checkArgument used to preserve historical behaviour of throwing IllegalArgumentException
  checkArgument(null != url, "Bundled plugins url cannot be null");
  Scanner scanner = null;
  // Legacy behaviour - treat file:// urls as per buildSourceScanner, but we don't
  // want the error or the empty scanner.
  final File file = FileUtils.toFile(url);
  if (null != file) {
    scanner = buildScannerCommon(file);
  }
  if (null == scanner) {
    // Not handled by file:// urls, so it's a zip url
    com.atlassian.plugin.util.FileUtils.conditionallyExtractZipFile(url, pluginPath);
    scanner = new DirectoryScanner(pluginPath);
  }
  return scanner;
}
com.atlassian.plugin.utilFileUtils

Most used methods

  • conditionallyExtractZipFile
    Extract the zip from the URL into the destination directory, but only if the contents haven't alread

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top Sublime Text 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