@Override public String toString() { if (toStringFormat == null) { toStringFormat = toString(false); } return toStringFormat; }
@Override public String toString() { if (toStringFormat == null) { toStringFormat = toString(false); } return toStringFormat; }
private List<String> getNamesIncludingRoot() { String[] names = toString().split(String.valueOf(quoteSeparator())); if (!usesWindowsFormat && isAbsolute() && names.length > 0) { return Arrays.asList(Arrays.copyOfRange(names, 1, names.length)); } return Arrays.asList(names); }
private List<String> getNamesIncludingRoot() { String[] names = toString().split(String.valueOf(quoteSeparator())); if (!usesWindowsFormat && isAbsolute() && names.length > 0) { return Arrays.asList(Arrays.copyOfRange(names, 1, names.length)); } return Arrays.asList(names); }
private String toURIString() { if (usesWindowsFormat) { return encodePath("/" + toString().replace("\\", "/")); } return encodePath(new String(path)); }
private String toURIString() { if (usesWindowsFormat) { return encodePath("/" + toString().replace("\\", "/")); } return encodePath(new String(path)); }
@Override public Path toRealPath(final LinkOption... options) throws IOException, SecurityException { if (isRealPath) { return this; } return newPath(fs, FilenameUtils.normalize(toString(), !usesWindowsFormat), host, true, true); }
@Override public Path toRealPath(final LinkOption... options) throws IOException, SecurityException { if (isRealPath) { return this; } return newPath(fs, FilenameUtils.normalize(toString(), !usesWindowsFormat), host, true, true); }
@Override public Path toAbsolutePath() throws IOException, SecurityException { if (isAbsolute()) { return this; } if (host.isEmpty()) { return newPath(fs, FilenameUtils.normalize(defaultDirectory() + toString(), !usesWindowsFormat), host, isRealPath, true); } return newPath(fs, defaultDirectory() + toString(false), host, isRealPath, true); }
@Override public Path toAbsolutePath() throws IOException, SecurityException { if (isAbsolute()) { return this; } if (host.isEmpty()) { return newPath(fs, FilenameUtils.normalize(defaultDirectory() + toString(), !usesWindowsFormat), host, isRealPath, true); } return newPath(fs, defaultDirectory() + toString(false), host, isRealPath, true); }
other.getNameCount())).toString(false); subpath = other.getSeparator() == getSeparator() ? subpath : subpath.replaceAll(other.quoteSeparator(), quoteSeparator()); sb.append(subpath);
other.getNameCount())).toString(false); subpath = other.getSeparator() == getSeparator() ? subpath : subpath.replaceAll(other.quoteSeparator(), quoteSeparator()); sb.append(subpath);