# path.split

Function · category: Other

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/core/path.js#L98

```ts
split(pathname: string): string[]
```

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.
