Package java.nio.file

Examples of java.nio.file.Path


  @Test
  public void testToJson4() throws IOException {
    DefaultMustacheFactory dmf = new DefaultMustacheFactory();
    Mustache compile = dmf.compile("fdbcli2.mustache");
    Path file = getPath("src/test/resources/fdbcli3.txt");
    String txt = new String(Files.readAllBytes(file), "UTF-8");
    System.out.println("Input text:[");
    System.out.print(txt);
    System.out.println("]");
    Node invert = compile.invert(txt);
View Full Code Here


  @Test
  public void testToJson5() throws IOException {
    DefaultMustacheFactory dmf = new DefaultMustacheFactory();
    Mustache compile = dmf.compile("fdbcli3.mustache");
    Path file = getPath("src/test/resources/fdbcli.txt");
    String txt = new String(Files.readAllBytes(file), "UTF-8");
    Node invert = compile.invert(txt);

    MappingJsonFactory jf = new MappingJsonFactory();
    StringWriter out = new StringWriter();
View Full Code Here

    }

    public RuntimeEnvironment initDefaultContent() {
        Runtime runtime = RuntimeLocator.getRequiredRuntime();
        RuntimePropertiesProvider propertyProvider = new RuntimePropertiesProvider(runtime);
    Path storagePath = DefaultRepositoryStorage.getRepositoryStoragePath(propertyProvider);
        File environmentXML = storagePath.resolve("environment.xml").toFile();
        try {
            InputStream content = new FileInputStream(environmentXML);
            initDefaultContent(content);
        } catch (FileNotFoundException ex) {
          LOGGER.warn("Cannot obtain inital runtime environment content from: {}" , environmentXML);
View Full Code Here

            }
        }
    }

    public String readSymbolicLink() throws IOException {
        Path path = file.toPath();
        Path link = Files.readSymbolicLink(path);
        return link.toString();
    }
View Full Code Here

            String version = resolveVersion(parentPom);
            projectParent.setVersion(version);

            // Calculate parent relative path
            Path parentPomPath = Paths.get(parentMavenFacet.getModelResource().getFullyQualifiedName());
            Path childPath = Paths.get(project.getRoot().getFullyQualifiedName());
            Path relativePath = childPath.relativize(parentPomPath).normalize();

            projectParent.setRelativePath(relativePath.toString());

            // Reuse GroupId and version from parent
            pom.setGroupId(null);
            pom.setVersion(null);
            pom.setParent(projectParent);
View Full Code Here

      Files.delete(Paths.get("src/test/resources/scanner/dir2"));
      Files.delete(Paths.get("src/test/resources/scanner/dir3"));
    }


    Path path =
        Paths.get("src/test/resources/scanner/");


    scannerPath.scan(path);
View Full Code Here

    errorStream.flush();
  }

  private void processFlagFile()
            throws CmdLineException, IOException {
    Path flagFile = Paths.get(flags.flagFile);

    BufferedReader buffer =
      java.nio.file.Files.newBufferedReader(flagFile, UTF_8);
    // Builds the tokens.
    StringBuilder builder = new StringBuilder();
View Full Code Here

            // https://github.com/davidB/livereload-jvm
            // reload the page when there are changes in the classpath
            // the idea is to watch for Less/JS modification
            // TODO probably it will mess with normal Java classes. Investigate!
            Path docroot = FileSystems.getDefault().getPath(".").resolve("target/classes/");
            LRServer lrServer = new LRServer(port, docroot);
            lrServer.start();
            System.in.read();
            System.out.println(">>> STOPPING EMBEDDED JETTY SERVER");
            lrServer.stop();
View Full Code Here

    if(sourceRange == null) {
      String msg = "Symbol " + fdResultEntry.extendedName + " has no source range info!";
      throw LangCore.createCoreException(msg, null);
    }
   
    Path newEditorFilePath = fdResultEntry.modulePath;
    if(newEditorFilePath == null) {
      throw LangCore.createCoreException("no file path provided", null);
    }
    IEditorInput newInput;
    if(areEqual(newEditorFilePath, inputPath)) {
View Full Code Here

    super.launch(resource, mode);
  }
 
  protected IFile getProjectExecutableArtifact(IProject project) {
    DubBundleDescription bundleInfo = DeeCore.getWorkspaceModel().getBundleInfo(project);
    Path targetFilePath = bundleInfo.getMainBundle().getEffectiveTargetFullPath();
   
    return project.getFile(EclipseUtils.path(targetFilePath));
  }
View Full Code Here

TOP

Related Classes of java.nio.file.Path

Copyright © 2018 www.massapicom. 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.