red-g / directory / Directory.Item

An Item within a Directory directory; either a File or a SubDirectory. They are located relative to their parent directory.


type Item
    = File Directory.File.File
    | SubDirectory Directory.SubDirectory.SubDirectory

An Item within a Directory directory; either a File or a SubDirectory. Items are located relative to their parent directory.

decoder : Json.Decode.Decoder Item

Decode a directory Item from the following JSON schema:

    {
        "SubDirectory"?: <Directory.SubDirectory>,
        "File"?: <Directory.File>
    }