Lines Matching refs:path
30 * Checks whether the given path is valid or not.
32 * @param path full path.
33 * @return true if this is valid path, otherwise false.
35 public static boolean isValidPath(String path) {
36 return (!TextUtils.isEmpty(path)) && (".".equals(path) || path.startsWith("./"));
40 * Parses path and returns name of the end node.
42 * @param nodePath path to the node.
51 * Parses passed path and returns name of the first node
52 * after root path.
54 * @param rootPath root path.
55 * @param nodePath full path to the node.
77 * Parses path and returns name of the end node and its root path.
79 * @param nodePath path to the node.
80 * @return root path (String[0]) and name node (String[1]).
117 * Checks whether the root path is a part of the node path.
119 * @param rootPath root path.
120 * @param nodePath path to some node.
135 public static String toRelativePath(String rootPath, String path) {
136 String r = path;
138 // deal with the root path of plugin tree
139 if (rootPath.equals(path) || path.isEmpty()) {
142 else if (path.startsWith(rootPath)) {
143 r = path.substring(rootPath.length() + 1);
145 // Log.i(TAG, "'" + path + "' -> '" + r + "'");
150 * convert to the absolute path
152 public static String toAbsolutePath(String rootPath, String path) {
153 String a = path;
154 if (path.isEmpty() || path.equals(ROOTNODE)) {
157 else if (!path.startsWith(rootPath)) {
158 a = rootPath + '/' + path;
160 // Log.i(TAG, "'" + path + "' -> '" + a + "'");