Examples of relativize()


Examples of java.net.URI.relativize()

          status.add(newFile(fileMetadata, subpath));
        }
      }
      for (String commonPrefix : listing.getCommonPrefixes()) {
        Path subpath = keyToPath(commonPrefix);
        String relativePath = pathUri.relativize(subpath.toUri()).getPath();
        status.add(newDirectory(new Path(absolutePath, relativePath)));
      }
      priorLastKey = listing.getPriorLastKey();
    } while (priorLastKey != null);
   
View Full Code Here

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

    boolean directory = Files.isDirectory(path);

    Set<Path> results = new HashSet<>();
    results.add(path);
    if (path.isAbsolute()) {
      results.add(workingDir.relativize(path));
    } else {
      results.add(workingDir.resolve(path));
    }
    if (directory) {
      for (Path p : ImmutableList.copyOf(results)) {
View Full Code Here

Examples of org.uberfire.java.nio.file.Path.relativize()

    }

    @Test(expected = IllegalArgumentException.class)
    public void relativize() {
        final Path path = GeneralPathImpl.create(fs, "/path/to/file.txt", false);
        path.relativize(null);
    }

    @Test(expected = IllegalArgumentException.class)
    public void compareTo() {
        final Path path = GeneralPathImpl.create(fs, "/path/to/file.txt", false);
View Full Code Here

Examples of org.xbill.DNS.Name.relativize()

    if (currentConfig != null) {
      final Name[] searchPath = currentConfig.searchPath();
      if (searchPath != null) {
        for (Name domain : searchPath) {
          if (hostname.subdomain(domain)) {
            return hostname.relativize(domain).toString();
          }
        }
      }
    }
    return hostname.toString();
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.