Shikensu.Definition

Definition

type alias Definition =
{ content : Maybe Bytes
, path : Path
, 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

{ content = Nothing
, path = FileSystem.Path.fromPosixString "test/hello.md"
, metadata = Dict.empty
}
create : Path -> Definition

Create a definition, given a (relative) path. In other words, the root property of a given path will always be ignored.

fork : Path -> Definition -> Definition

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