Codota Logo
MountableFile.deleteOnExit
Code IndexAdd Codota to your IDE (free)

How to use
deleteOnExit
method
in
org.testcontainers.utility.MountableFile

Best Java code snippets using org.testcontainers.utility.MountableFile.deleteOnExit (Showing top 2 results out of 315)

  • Common ways to obtain MountableFile
private void myMethod () {
MountableFile m =
  • Codota IconString resourceName;MountableFile.forClasspathResource(resourceName)
  • Smart code suggestions by Codota
}
origin: testcontainers/testcontainers-java

deleteOnExit(tmpLocation.toPath());
origin: org.testcontainers/testcontainers

@SuppressWarnings("ResultOfMethodCallIgnored")
private void copyFromJarToLocation(final JarFile jarFile, final JarEntry entry, final String fromRoot, final File toRoot) throws IOException {
  String destinationName = entry.getName().replaceFirst(fromRoot, "");
  File newFile = new File(toRoot, destinationName);
  log.debug("Copying resource {} from JAR file {}", fromRoot, jarFile.getName());
  if (!entry.isDirectory()) {
    // Create parent directories
    Path parent = newFile.getAbsoluteFile().toPath().getParent();
    parent.toFile().mkdirs();
    newFile.deleteOnExit();
    try (InputStream is = jarFile.getInputStream(entry)) {
      Files.copy(is, newFile.toPath());
    } catch (IOException e) {
      log.error("Failed to extract classpath resource " + entry.getName() + " from JAR file " + jarFile.getName(), e);
      throw e;
    }
  }
}
org.testcontainers.utilityMountableFiledeleteOnExit

Popular methods of MountableFile

  • forClasspathResource
  • forHostPath
  • getResolvedPath
  • <init>
  • copyFromJarToLocation
  • createTempDirectory
  • extractClassPathResourceToTempLocation
    Extract a file or directory tree from a JAR file to a temporary location. This allows Docker to moun
  • getClasspathResource
  • getFilesystemPath
  • getModeValue
  • getResourcePath
  • getUnixFileMode
  • getResourcePath,
  • getUnixFileMode,
  • unencodeResourceURIToFilePath,
  • getFileMode,
  • recursiveTar,
  • resolveFilesystemPath,
  • resolvePath,
  • transferTo

Popular in Java

  • Updating database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
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