Breaks file path into names.
@param path
@return array of names
558143
static String[] getPathNames(String path) {
    if (path == null || !path.startsWith(Path.SEPARATOR)) {
      return null;
    }
    return StringUtils.split(path, Path.SEPARATOR_CHAR);
  }
772981
private Object[] compile(String path) {
        List<String> lst;

        lst = Filesystem.SEPARATOR.split(path);
        if (lst.size() == 0) {
            throw new IllegalArgumentException("empty path: " + path);
        }
        if (lst.get(0).equals("")) {
            throw new IllegalArgumentException("absolute path not allowed: " + path);
        }
        if (lst.get(lst.size() - 1).equals("")) {
            throw new IllegalArgumentException(
                "path must not end with separator: " + path);
        }
        return compileTail(lst, 0);
    }
269880
def splitpath(path):
    """"""
    c = []
    head, tail = os.path.split(path)
    while tail:
        c.insert(0, tail)
        head, tail = os.path.split(head)
    return c
232567
private String normalizeFilePath(final String path) {
        String normalizedPath = path.replace('\\', '/');

        if (!normalizedPath.startsWith("/")) {
            normalizedPath = "/" + normalizedPath;
        }

        return normalizedPath;
    }
150728
@Override
	public Set<String> getResourceNames(String path) {
		path = path.replace('/', File.separatorChar);
		File resource = new File(baseDir, path);
		return FileUtils.getResourceNames(resource);
	}
147841
public static String nameOnly(String path)
   {
      int index = path.lastIndexOf('/');
      String name = index == -1 ? path : path.substring(index + 1);
      if (name.endsWith("]"))
      {
         index = name.lastIndexOf('[');
         return index == -1 ? name : name.substring(0, index);
      }
      return name;
   }
930866
@SuppressWarnings("unchecked")
	@Override
	public Set<String> getResourceNames(String path) {
		Set<String> paths = context.getResourcePaths(path);
		Set<String> names = new HashSet<>();
		int length = path.length();
		if (null != paths) {
			for (String resourcePath : paths) {
				names.add(resourcePath.substring(length, resourcePath.length()));
			}
		}
		return names;
	}
242707
public function ls(string $path): array
    {
        $files = [];
        $d = dir($path);
        while (false !== ($entry = $d->read())) {
            if (in_array($entry, ['.', '..'], true)) {
                continue;
            }
            $entryPath = $path . $entry;
            if (is_dir($entryPath)) {
                foreach ($this->ls($entryPath . DIRECTORY_SEPARATOR) as $entryPath) {
                    $files[] = $entryPath;
                }
                continue;
            }
            if (!is_file($entryPath)) {
                continue;
            }
            $files[] = $entryPath;
        }
        $d->close();

        return $files;
    }
234624
@Override
	public Set<String> getResourceNames(String path) {
		return ((WebJarsLocatorPathResolver)resolver).getResourceNames(path);
	}
1320104
public static String getFilenameExtension(String path) {
        if (path == null) return null;

        int extIndex = path.lastIndexOf(EXTENSION_SEPARATOR);
        if (extIndex == -1) return null;

        int folderIndex = path.lastIndexOf(FOLDER_SEPARATOR);
        if (folderIndex > extIndex) return null;

        return path.substring(extIndex + 1);
    }
1172517
def _split_path_by_reserved_name(self, path):
        """"""
        for i, e in enumerate(path):
            if e in self._resolvers or e == self._get_readme_filename():
                return path[:i], path[i], path[i + 1 :]
        raise d1_onedrive.impl.onedrive_exceptions.PathException(
            'Invalid folder: %s' % str(path)
        )
942267
function getFileName(path) {
		var re = /([\w\.\-]+)$/i;
		var m = re.exec(path);
		return m ? m[1] : '';
	}
345559
public static List<ChildNumber> parsePath(@Nonnull String path) {
        String[] parsedNodes = path.replace("M", "").split("/");
        List<ChildNumber> nodes = new ArrayList<>();

        for (String n : parsedNodes) {
            n = n.replaceAll(" ", "");
            if (n.length() == 0) continue;
            boolean isHard = n.endsWith("H");
            if (isHard) n = n.substring(0, n.length() - 1);
            int nodeNumber = Integer.parseInt(n);
            nodes.add(new ChildNumber(nodeNumber, isHard));
        }

        return nodes;
    }
1062738
public static List<String> tokenize_path(String path) {
        String[] tokens = path.split(SEPARATOR);
        java.util.ArrayList<String> rtn = new ArrayList<>();
        for (String str : tokens) {
            if (!str.isEmpty()) {
                rtn.add(str);
            }
        }
        return rtn;
    }
865800
static List<String> path(String name, @Nullable Path path) {
    if (path != null && !path.toString().isEmpty()) {
      return Arrays.asList("--" + name, path.toAbsolutePath().toString());
    }
    return Collections.emptyList();
  }
767027
public static String createFolderPath(String path) {

        String[] pathParts = path.split("\\.");
        String path2 = "";
        for (String part : pathParts) {
            if (path2.equals("")) {
                path2 = part;
            } else {
                path2 = path2 + File.separator
                        + changeFirstLetterToLowerCase(createClassName(part));
            }
        }

        return path2;
    }
965780
private String[] splitPath(String path) {

        path = path.replaceAll("^/", "").replaceAll("/$", "");
        return path.split("/");
    }