Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype ApplicationId = ApplicationId Text
- newtype DocumentId = DocumentId Text
- data AddFlag
- data GrantPermission
- newtype ExtraResults = ExtraResults {
- mountpoint :: OsPath
- getMountPoint :: Client -> IO OsPath
- add :: Client -> FileSpec -> Bool -> Bool -> IO DocumentId
- addFull :: Client -> [FileSpec] -> [AddFlag] -> Maybe ApplicationId -> [GrantPermission] -> IO ([DocumentId], ExtraResults)
- addNamed :: Client -> FileSpec -> OsString -> Bool -> Bool -> IO DocumentId
- addNamedFull :: Client -> FileSpec -> OsString -> [AddFlag] -> Maybe ApplicationId -> [GrantPermission] -> IO (DocumentId, ExtraResults)
- grantPermissions :: Client -> DocumentId -> ApplicationId -> [GrantPermission] -> IO ()
- revokePermissions :: Client -> DocumentId -> ApplicationId -> [GrantPermission] -> IO ()
- delete :: Client -> DocumentId -> IO ()
Common Types
newtype ApplicationId Source #
Instances
IsString ApplicationId Source # | |
Defined in Desktop.Portal.Documents fromString :: String -> ApplicationId # | |
Show ApplicationId Source # | |
Defined in Desktop.Portal.Documents showsPrec :: Int -> ApplicationId -> ShowS # show :: ApplicationId -> String # showList :: [ApplicationId] -> ShowS # | |
Eq ApplicationId Source # | |
Defined in Desktop.Portal.Documents (==) :: ApplicationId -> ApplicationId -> Bool # (/=) :: ApplicationId -> ApplicationId -> Bool # | |
Ord ApplicationId Source # | |
Defined in Desktop.Portal.Documents compare :: ApplicationId -> ApplicationId -> Ordering # (<) :: ApplicationId -> ApplicationId -> Bool # (<=) :: ApplicationId -> ApplicationId -> Bool # (>) :: ApplicationId -> ApplicationId -> Bool # (>=) :: ApplicationId -> ApplicationId -> Bool # max :: ApplicationId -> ApplicationId -> ApplicationId # min :: ApplicationId -> ApplicationId -> ApplicationId # |
newtype DocumentId Source #
Instances
IsString DocumentId Source # | |
Defined in Desktop.Portal.Documents fromString :: String -> DocumentId # | |
Show DocumentId Source # | |
Defined in Desktop.Portal.Documents showsPrec :: Int -> DocumentId -> ShowS # show :: DocumentId -> String # showList :: [DocumentId] -> ShowS # | |
Eq DocumentId Source # | |
Defined in Desktop.Portal.Documents (==) :: DocumentId -> DocumentId -> Bool # (/=) :: DocumentId -> DocumentId -> Bool # | |
Ord DocumentId Source # | |
Defined in Desktop.Portal.Documents compare :: DocumentId -> DocumentId -> Ordering # (<) :: DocumentId -> DocumentId -> Bool # (<=) :: DocumentId -> DocumentId -> Bool # (>) :: DocumentId -> DocumentId -> Bool # (>=) :: DocumentId -> DocumentId -> Bool # max :: DocumentId -> DocumentId -> DocumentId # min :: DocumentId -> DocumentId -> DocumentId # |
data GrantPermission Source #
Instances
Show GrantPermission Source # | |
Defined in Desktop.Portal.Documents showsPrec :: Int -> GrantPermission -> ShowS # show :: GrantPermission -> String # showList :: [GrantPermission] -> ShowS # | |
Eq GrantPermission Source # | |
Defined in Desktop.Portal.Documents (==) :: GrantPermission -> GrantPermission -> Bool # (/=) :: GrantPermission -> GrantPermission -> Bool # |
newtype ExtraResults Source #
Instances
Show ExtraResults Source # | |
Defined in Desktop.Portal.Documents showsPrec :: Int -> ExtraResults -> ShowS # show :: ExtraResults -> String # showList :: [ExtraResults] -> ShowS # | |
Eq ExtraResults Source # | |
Defined in Desktop.Portal.Documents (==) :: ExtraResults -> ExtraResults -> Bool # (/=) :: ExtraResults -> ExtraResults -> Bool # |
Documents Portal Methods
:: Client | |
-> FileSpec | The file to add to the documents store. |
-> Bool | Whether to re-use the existing entry in the documents store, if this file is already there. |
-> Bool | Whether this file should stay in the documents store after this app shuts down. |
-> IO DocumentId | The id (folder name) of the file in the store. |
Add a file to the documents store, with basic configuration options.
:: Client | |
-> [FileSpec] | The files to add to the documents store. |
-> [AddFlag] | The flags to apply to the files. |
-> Maybe ApplicationId | The id of another application that will be granted access to the files. |
-> [GrantPermission] | The permissions to grant to the other application. |
-> IO ([DocumentId], ExtraResults) | The id (folder name) of each file in the store. |
Add multiple files to the document store, with full configuration options.
:: Client | |
-> FileSpec | The parent directory of the file to add to the documents store. |
-> OsString | The basename of the file. |
-> Bool | Whether to re-use the existing entry in the documents store, if this file is already there. |
-> Bool | Whether this file should stay in the documents store after this app shuts down. |
-> IO DocumentId | The id (folder name) of the file in the store. |
Add a file to the document store with a specified name, with basic configuration options.
:: Client | |
-> FileSpec | The parent directory of the file to add to the documents store. |
-> OsString | The basename of the file. |
-> [AddFlag] | The flags to apply to the file. |
-> Maybe ApplicationId | The id of another application that will be granted access to the file. |
-> [GrantPermission] | The permissions to grant to the other application. |
-> IO (DocumentId, ExtraResults) | The id (folder name) of the file in the store. |
Add a file to the document store with a specified name, with full configuration options.
grantPermissions :: Client -> DocumentId -> ApplicationId -> [GrantPermission] -> IO () Source #
revokePermissions :: Client -> DocumentId -> ApplicationId -> [GrantPermission] -> IO () Source #