red-g / directory / Path.File

An absolute file path.


type alias File =
Internal.FilePath

An absolute file path.

decoder : Json.Decode.Decoder File

Decode a File path from the following JSON schema:

    {
        "stem": string,
        "extension": string?,
        "directory": <Directory>
    }

directory : File -> Path.Directory.Directory

Get the directory that contains the file.

encode : File -> Json.Encode.Value

Encode a File path to the following JSON schema:

    {
        "stem": string,
        "extension": string?,
        "directory": <Directory>
    }

extension : File -> Maybe String

Get the type of a file, if it has one.

stem : File -> String

Get the part of a file name before its type.