• Parameters

    • path: string

      a string to deconstruct into members

    • delim: string

      the delimeter used for splitting

    Returns {
        name: string;
        parent: string;
    }[]

    an array where each value is the a "step" along the deconstructed path - parent is the preceding, name is the current step

    for example:

    deconstructedPaths("/alpha/bravo/gamma/delta/", "/") returns [
    {parent: "/", name: "alpha/", }
    {parent: "/alpha/", name: "bravo/", }
    {parent: "/alpha/bravo/", name: "gamma/", }
    {parent: "/alpha/bravo/gamma/", name: "delta/"}
    ]

    see useFileTree for some heavy usage