Safe Haskell | None |
---|
- type Library = Seq LibraryItem
- type ItemId = Int
- data LibraryItem
- = Deleted
- | Item {
- itemId :: !ItemId
- itemName :: !Text256
- itemDescription :: !(Maybe Text4096)
- itemDateCreated :: !UTCTime
- itemDateModified :: !UTCTime
- itemParent :: !ItemId
- itemType :: !(Either Directory UUIRI)
- data Error
- move :: Library -> ItemId -> ItemId -> UTCTime -> Either Error Library
- copy :: Library -> ItemId -> ItemId -> UTCTime -> Either Error Library
- delete :: Library -> ItemId -> Library
- rename :: Library -> ItemId -> Text -> UTCTime -> Library
- describe :: Library -> ItemId -> Text -> UTCTime -> Library
- touch :: Library -> ItemId -> UTCTime -> Library
- new :: Text -> Maybe Text -> UTCTime -> ItemId -> Maybe UUIRI -> Library -> Either Error Library
- unsafeGetItem :: ItemId -> Library -> LibraryItem
- getItem :: ItemId -> Library -> Either Error LibraryItem
Documentation
type Library = Seq LibraryItemSource
A Library is just a rebranded Seq
data LibraryItem Source
An item in the library
Deleted | |
Item | |
|
Some errors that might occur
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