Shikensu.Definition

Definition

type alias Definition =
{ baseName : String
, content : Maybe Bytes
, directoryPath : Path Directory
, extensionName : Maybe String
, metadata : Dict String Value
}

A piece of content.

Example definition, given: The working directory root path /Users/icidasset/Projects/shikensu/example/ and the full item path /Users/icidasset/Projects/shikensu/example/test/hello.md

{ baseName = "hello"
, content = Nothing
, directoryPath = Path.directory [ "test" ]
, extensionName = Just "md"
, metadata = Dict.empty
}
create : Path File -> Definition

Create a definition, given a relative path.

fork : Path File -> Definition -> Definition

Fork a definition, given a relative path. Taking the metadata and content of the original definition.

relativePath : Definition -> Path File

The path relative to the working directory.