Returns the label of a path.

@param path the path
@param isOSPath if <code>true</code>, the path represents an OS path, if <code>false</code> it is a workspace path.
@return the label of the path to be used in the UI.
342785
protected static String getPathLabel(IPath path, boolean isOSPath) {
		String label;
		if (isOSPath) {
			label= path.toOSString();
		} else {
			label= path.makeRelative().toString();
		}
		return label;
	}
1337677
public static String separatorsToSystem(final String path) {
        if (path == null) {
            return null;
        }
        if (IOUtil.IS_OS_WINDOWS) {
            return separatorsToWindows(path);
        } else {
            return separatorsToUnix(path);
        }
    }
871452
public static String getExtension(String path) {
        int dot = path.lastIndexOf(".");
        if (dot == -1) {
            return "";
        } else {
            return path.substring(dot + 1, path.length());
        }
    }
852170
protected String findClasspathFile(final String path) throws IOException {
        if (path == null){
            return null;
        }
        final File file = new File(path);
        if (file.exists()){
            return file.getAbsolutePath();
        }
        return createTmpFile(path).getAbsolutePath();
    }
1315168
private String pathToKey(Path path) {
    if (!path.isAbsolute()) {
      path = new Path(workingDir, path);
    }

    if (path.toUri().getScheme() != null && path.toUri().getPath().isEmpty()) {
      return "";
    }

    return path.toUri().getPath().substring(1);
  }
147510
public String getFullPath(String path) {

		if (StringUtils.isEmpty(pathPrefix)) {
			return path;
		}

		return PathNormalizer.asPath(pathPrefix + path);
	}
861683
public ScanDestination getDestinationWithSubpath(String path) {
        if (isDiscarding()) {
            return discard();
        }
        if (path == null) {
            return new ScanDestination(_uri);
        }
        return new ScanDestination(UriBuilder.fromUri(_uri).path(path).build());
    }
373171
public static String encodePath(String path) {
        URI tmp;

        try {
            tmp = new URI("foo", "host", "/" + path, null);
        } catch (URISyntaxException e) {
            throw new IllegalStateException(e);
        }
        return tmp.getRawPath().substring(1);
    }
957747
private String getBaseRepoPath(final String path) {
        int pos;
        if (path.contains("local-repo")) {
            pos = path.indexOf("local-repo" + File.separator) + 11;
        } else {
            pos = path.indexOf("repository" + File.separator) + 11;
        }
        if (pos < 0) {
            return path;
        }
        int tmp = path.indexOf(File.separator, pos);
        if (tmp <= 0) {
            return path;
        }
        //below is always true
        //if (tmp > 0) {
        pos = tmp + 1;
        //}
        tmp = path.indexOf(File.separator, pos);
        if (tmp > 0) {
            pos = tmp + 1;
        }
        return path.substring(0, pos);
    }
47163
public static Path<?> getPath(Path<?> path, String propertyPath) {
        if (StringUtils.isEmpty(propertyPath)) return path;

        String name = StringUtils.substringBefore(propertyPath, PropertyUtils.PROPERTY_SEPARATOR);
        Path<?> p = path.get(name);

        return getPath(p, StringUtils.substringAfter(propertyPath, PropertyUtils.PROPERTY_SEPARATOR));

    }
25212
public static String applySpecialPaths(String path) throws IllegalArgumentException {
        List<String> tokens = getTokens(path);
        if (tokens == null) { return null; }
        int i = 0;
        for (int j = 0; j < tokens.size(); j++) {
            String token = tokens.get(j);
            if (isCurrentToken(token)) { continue; } else if (isReverseToken(token)) { i--; } else { tokens.set(i++, token); }
            if (i < 0) {
                throw VFSMessages.MESSAGES.onRootPath();
            }
        }
        return getRemainingPath(tokens, 0, i);
    }
117853
public static String getResource(final String path) {
		final InputStream stream = getResourceStream(path);
		final BufferedReader reader = new BufferedReader(new InputStreamReader(stream));
		final Stream<String> lines = reader.lines();
		return lines.collect(Collectors.joining("\n"));
	}
593832
private String getPath(QPath path)
   {
      try
      {
         return lFactory.createJCRPath(path).getAsString(false);
      }
      catch (RepositoryException e)
      {
         throw new IllegalStateException(e.getMessage(), e);
      }
   }
1021602
public static String path( String path ) {
		String pathToBase = getPathToBase();
		if( pathToBase == null )
			return path;
		return new File(pathToBase,path).getAbsolutePath();
	}
212843
public static String getClassName(String path) {
        for (Pattern pattern : patterns) {
            Matcher m = pattern.matcher(path);
            if (m.find()) {
                return m.group(1).replaceAll("[/\\\\]", ".");
            }
        }
        return null;
    }
966341
public String getRealPath(String path) {
        if (context != null) {
            return context.getRealPath(path);
        }
        return path;
    }
344532
public static ObjectReference getObjectRefByPath(final String path) {
        if (path == null) {
            return null;
        }
        return new ObjectReference().withSelector(path);
    }