FilePath.parent

Returns a path representing the parent of this one. This will typically return the current path component, though with a special case where the name component is empty. In such cases, the path is scanned for a prior segment:

  • normal: /x/y/z => /x/y
  • special: /x/y/ => /x

Note that this returns a path suitable for splitting into path and name components (there's no trailing separator).

See pop() also, which is generally more useful when working with FilePath instances.

class FilePath
@property final inout
inout(char)[]
parent
()

Meta