public static List<String> parse(String unixPath) {
    List<String> pathComponents = new ArrayList<>();
    // -1 limit for Guava Splitter behavior: https://errorprone.info/bugpattern/StringSplitter
    for (String component : unixPath.split("/", -1)) {
      if (!component.isEmpty()) {
        pathComponents.add(component);
      }
    }
    return pathComponents;
  }
Parses a Unix-style path into a list of path components.

@param unixPath the Unix-style path
@return a list of path components
jib-build-plan/src/main/java/com/google/cloud/tools/jib/buildplan/UnixPathParser.java