Returns the parent directory of a path. If the input is an absolute root, returns the root itself
The input path
The normalized parent path, or root if input is root
parent('foo/bar/baz') // returns 'foo/bar'parent('c:/foo') // returns 'c:'parent('c:/') // returns 'c:' Copy
parent('foo/bar/baz') // returns 'foo/bar'parent('c:/foo') // returns 'c:'parent('c:/') // returns 'c:'
Returns the parent directory of a path. If the input is an absolute root, returns the root itself