Package java.nio.file

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


        try {
            File destination = null;

            try {
                destination = Files.createSymbolicLink(parent.resolve("destination"), symlinkTarget).toFile();
            } catch (UnsupportedOperationException e) {
                LOG.info("Skipping testInitialDeploymentGlossesOverSymlinksInParents. The current filesystem doesn't support symlinks");
                return;
            }
View Full Code Here


            System.out.println("map-->\n" + map);
            System.out.println("diff->\n" + diff);

            assert map.size() == 3 : map;

            assert parent.resolve("realDest/rawA.txt").toFile().exists() : "rawA.txt not deployed correctly";
            assert parent.resolve("realDest/rawA2.txt").toFile().exists() : "rawA2.txt not deployed correctly";
            assert root.resolve("realDest/rawB.txt").toFile().exists() : "rawB.txt not deployed correctly";

            //the symlink target, being the destination of the deployment should have the .rhqdeployments directory
            //specified. No other files should exist there though.
View Full Code Here

            System.out.println("diff->\n" + diff);

            assert map.size() == 3 : map;

            assert parent.resolve("realDest/rawA.txt").toFile().exists() : "rawA.txt not deployed correctly";
            assert parent.resolve("realDest/rawA2.txt").toFile().exists() : "rawA2.txt not deployed correctly";
            assert root.resolve("realDest/rawB.txt").toFile().exists() : "rawB.txt not deployed correctly";

            //the symlink target, being the destination of the deployment should have the .rhqdeployments directory
            //specified. No other files should exist there though.
            assert symlinkTarget.resolve(".rhqdeployments").toFile().exists() : "Could not find .rhqdeployments on the expected location";
View Full Code Here

    public CPieceSet(String name) {
        Path dir = Main.DIRECTORY.resolve("res").resolve("piecesets").resolve(name);
        File file;
       
        for (EPiece piece : EPiece.values()) {
            file = dir.resolve(piece.name().toLowerCase() + ".png").toFile();
            try {
                pieces.put(piece, ImageIO.read(file));
            } catch (Exception e) {
                Main.LOG.log(Level.SEVERE, "cannot load piece image", e);
            }
View Full Code Here

    new Thread(new Runnable() {
      @Override
      public void run() {
        try {
          Thread.sleep(1000);
          Files.createDirectory(rootPath.resolve("tmp"));
          Files.createDirectory(rootPath.resolve("tmp/dir"));
          Files.createFile(rootPath.resolve("tmp/file"));
          Files.createFile(rootPath.resolve("tmp/dir/file2"));
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

      @Override
      public void run() {
        try {
          Thread.sleep(1000);
          Files.createDirectory(rootPath.resolve("tmp"));
          Files.createDirectory(rootPath.resolve("tmp/dir"));
          Files.createFile(rootPath.resolve("tmp/file"));
          Files.createFile(rootPath.resolve("tmp/dir/file2"));
        } catch (Exception e) {
          e.printStackTrace();
        }
View Full Code Here

      public void run() {
        try {
          Thread.sleep(1000);
          Files.createDirectory(rootPath.resolve("tmp"));
          Files.createDirectory(rootPath.resolve("tmp/dir"));
          Files.createFile(rootPath.resolve("tmp/file"));
          Files.createFile(rootPath.resolve("tmp/dir/file2"));
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
View Full Code Here

        try {
          Thread.sleep(1000);
          Files.createDirectory(rootPath.resolve("tmp"));
          Files.createDirectory(rootPath.resolve("tmp/dir"));
          Files.createFile(rootPath.resolve("tmp/file"));
          Files.createFile(rootPath.resolve("tmp/dir/file2"));
        } catch (Exception e) {
          e.printStackTrace();
        }
      }
    }).start();
View Full Code Here

            cache = getCacheHome().resolve((isWindows() ? "" : ".") + cacheName);
        }
        try {
            if (!Files.exists(cache))
                Files.createDirectory(cache);
            if (!Files.exists(cache.resolve(APP_CACHE_NAME)))
                Files.createDirectory(cache.resolve(APP_CACHE_NAME));
            if (!Files.exists(cache.resolve(DEPS_CACHE_NAME)))
                Files.createDirectory(cache.resolve(DEPS_CACHE_NAME));

            return cache;
View Full Code Here

        }
        try {
            if (!Files.exists(cache))
                Files.createDirectory(cache);
            if (!Files.exists(cache.resolve(APP_CACHE_NAME)))
                Files.createDirectory(cache.resolve(APP_CACHE_NAME));
            if (!Files.exists(cache.resolve(DEPS_CACHE_NAME)))
                Files.createDirectory(cache.resolve(DEPS_CACHE_NAME));

            return cache;
        } catch (IOException e) {
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.