• Split the pathname path into a pair [head, tail] where tail is the final part of the path after the last delimiter and head is everything leading up to that. tail will never contain a slash.

    Parameters

    • pathname: string

      The path to split.

    Returns string[]

    The split path which is an array of two strings, the path and the filename.