• Returns the path segments as an array

    Parameters

    • path: string

      path to get folders from

    Returns string[]

    the path segments

    getListOfFolderNames('\\'); // []
    getListOfFolderNames(''); // []
    getListOfFolderNames('\\hello'); // ['hello']
    getListOfFolderNames('\\hello\\world'); // ['hello', 'world']
    getListOfFolderNames('\\hello\\world\\'); // ['hello', 'world']