Examples of toAbsolutePath()


Examples of java.nio.file.Path.toAbsolutePath()

        final Path directory = Files.createTempDirectory(tmpDir, null);
        final Path tmpFile = Files.createTempFile(directory, null, null);
        PollPathMonitor pathMonitor = new PollPathMonitor(directory, new PathStateChangeListener() {
            @Override
            public void pathChanged(Path path) {
                assertEquals(tmpFile.toAbsolutePath(), path.toAbsolutePath());
                throw new JumpError();
            }
        });
        Thread thread = new Thread(new Runnable() {
            @Override
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        final Path directory = Files.createTempDirectory(tmpDir, null);
        final Path tmpFile = Files.createTempFile(directory, null, null);
        PushPathMonitor pathMonitor = new PushPathMonitor(directory, new PathStateChangeListener() {
            @Override
            public void pathChanged(Path path) {
                assertEquals(tmpFile.toAbsolutePath(), path.toAbsolutePath());
                throw new JumpError();
            }
        });
        Thread thread = new Thread(new Runnable() {
            @Override
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        final Path directory = Files.createTempDirectory(tmpDir, null);
        final Path tmpFile = Files.createTempFile(directory, null, null);
        PushPathMonitor pathMonitor = new PushPathMonitor(directory, new PathStateChangeListener() {
            @Override
            public void pathChanged(Path path) {
                assertEquals(tmpFile.toAbsolutePath(), path.toAbsolutePath());
                throw new JumpError();
            }
        });
        Thread thread = new Thread(new Runnable() {
            @Override
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        URL chromedriverResourceUrl = JuUrl.resource("chromedriver.exe");
        AssertUtil.assertNotNull("Couldn't find chromedriver.exe on classpath", chromedriverResourceUrl);
       
        logger.debug("Copying chromedriver.exe from resource {} to {}"
            , chromedriverResourceUrl
            , chromeDriverExePath.toAbsolutePath());
        try (InputStream is = new BufferedInputStream(chromedriverResourceUrl.openStream())) {
          Files.copy(is, chromeDriverExePath, StandardCopyOption.REPLACE_EXISTING);
        }
       
        DriverRule.copiedChromeDriverExe = true;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        try {
            if (!Files.exists(appDir))
                Files.createDirectory(appDir);
            return appDir;
        } catch (IOException e) {
            throw new RuntimeException("Application cache directory " + appDir.toAbsolutePath() + " could not be created.");
        }
    }

    private static Path getCacheDir() {
        final Path cache;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

            if (!Files.exists(cache.resolve(DEPS_CACHE_NAME)))
                Files.createDirectory(cache.resolve(DEPS_CACHE_NAME));

            return cache;
        } catch (IOException e) {
            throw new RuntimeException("Error opening cache directory " + cache.toAbsolutePath(), e);
        }
    }

    private static Path getCacheHome() {
        final Path userHome = Paths.get(System.getProperty(PROP_USER_HOME));
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

                throw new RuntimeException("Could not find Java installation for requested version "
                        + getAttribute(ATTR_MIN_JAVA_VERSION) + " / " + getAttribute(ATTR_JAVA_VERSION)
                        + "(JDK required: " + jdk + ")"
                        + ". You can override the used Java version with the -D" + PROP_CAPSULE_JAVA_HOME + " flag.");
            }
            jhome = javaHomePath.toAbsolutePath().toString();
        }
        return jhome;
    }

    private boolean isMatchingJavaVersion(String javaVersion) {
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

            debug("Local repo: " + localRepo);

            final boolean offline = "".equals(System.getProperty(PROP_OFFLINE)) || Boolean.parseBoolean(System.getProperty(PROP_OFFLINE));
            debug("Offline: " + offline);

            final DependencyManager dm = new DependencyManager(localRepo.toAbsolutePath(), repositories, reset, offline);

            return dm;
        } catch (NoClassDefFoundError e) {
            throw new RuntimeException("Jar " + jar.getName()
                    + " specifies dependencies, while the necessary dependency management classes are not found in the jar");
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        URL chromedriverResourceUrl = JuUrl.resource("chromedriver.exe");
        AssertUtil.assertNotNull("Couldn't find chromedriver.exe on classpath", chromedriverResourceUrl);
       
        logger.debug("Copying chromedriver.exe from resource {} to {}"
            , chromedriverResourceUrl
            , chromeDriverExePath.toAbsolutePath());
        try (InputStream is = new BufferedInputStream(chromedriverResourceUrl.openStream())) {
          Files.copy(is, chromeDriverExePath, StandardCopyOption.REPLACE_EXISTING);
        }
       
        DriverRule.copiedChromeDriverExe = true;
View Full Code Here

Examples of java.nio.file.Path.toAbsolutePath()

        try {
            if (!Files.exists(appDir))
                Files.createDirectory(appDir);
            return appDir;
        } catch (IOException e) {
            throw new RuntimeException("Application cache directory " + appDir.toAbsolutePath() + " could not be created.");
        }
    }

    private boolean needsAppCache() {
        if (isEmptyCapsule())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.