dirfiles-0.1.0.0

Safe HaskellNone

Data.Library

Synopsis

Documentation

type Library = Seq LibraryItemSource

A Library is just a rebranded Seq

data Error Source

Some errors that might occur

Instances

rename :: Library -> ItemId -> Text -> UTCTime -> LibrarySource

Changes the name of an item

describe :: Library -> ItemId -> Text -> UTCTime -> LibrarySource

Sets the description of an item

touch :: Library -> ItemId -> UTCTime -> LibrarySource

Sets the modified date of an item to the one supplied in arg t

new :: Text -> Maybe Text -> UTCTime -> ItemId -> Maybe UUIRI -> Library -> Either Error LibrarySource

Create a new item in the library If createing a directory then uuiri must be Nothing

unsafeGetItem :: ItemId -> Library -> LibraryItemSource

No bounds checking and doesn't filter deleted items returns an exception error when the item is not found

getItem :: ItemId -> Library -> Either Error LibraryItemSource

Does bounds checking and also checks if the item was not deleted