Method hasPrefix()
Returns true if the current path equals to the parent, or it starts with all components of the parent.
Examples:
local path = parsePath("/foo/bar")
path:hasPrefix(parsePath("/foo")) -- true
path:hasPrefix(parsePath("/")) -- true
path:hasPrefix(parsePath("/foo/bug")) -- false
path:hasPrefix(parsePath("/foo/ba")) -- false