Converts a path string to a list of path segments.
Example: 'path/to/file' -> 'path', 'to', 'file'
'path', 'to', 'file'
static List<String> toPathSegments(String path) => toList(value: path, regex: "/");