wildstar
    Preparing search index...

    Function parent

    • Returns the parent directory of a path. If the input is an absolute root, returns the root itself

      Parameters

      • path: string

        The input path

      Returns string

      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:'