| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Desktop.Portal.Documents
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 #
Constructors
| ApplicationId Text |
Instances
| IsString ApplicationId Source # | |
Defined in Desktop.Portal.Documents Methods fromString :: String -> ApplicationId # | |
| Show ApplicationId Source # | |
Defined in Desktop.Portal.Documents Methods showsPrec :: Int -> ApplicationId -> ShowS # show :: ApplicationId -> String # showList :: [ApplicationId] -> ShowS # | |
| Eq ApplicationId Source # | |
Defined in Desktop.Portal.Documents Methods (==) :: ApplicationId -> ApplicationId -> Bool # (/=) :: ApplicationId -> ApplicationId -> Bool # | |
| Ord ApplicationId Source # | |
Defined in Desktop.Portal.Documents Methods 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 #
Constructors
| DocumentId Text |
Instances
| IsString DocumentId Source # | |
Defined in Desktop.Portal.Documents Methods fromString :: String -> DocumentId # | |
| Show DocumentId Source # | |
Defined in Desktop.Portal.Documents Methods showsPrec :: Int -> DocumentId -> ShowS # show :: DocumentId -> String # showList :: [DocumentId] -> ShowS # | |
| Eq DocumentId Source # | |
Defined in Desktop.Portal.Documents | |
| Ord DocumentId Source # | |
Defined in Desktop.Portal.Documents Methods compare :: DocumentId -> DocumentId -> Ordering # (<) :: DocumentId -> DocumentId -> Bool # (<=) :: DocumentId -> DocumentId -> Bool # (>) :: DocumentId -> DocumentId -> Bool # (>=) :: DocumentId -> DocumentId -> Bool # max :: DocumentId -> DocumentId -> DocumentId # min :: DocumentId -> DocumentId -> DocumentId # | |
Instances
data GrantPermission Source #
Constructors
| GrantRead | |
| GrantWrite | |
| GrantGrantPermissions | |
| GrantDelete |
Instances
| Show GrantPermission Source # | |
Defined in Desktop.Portal.Documents Methods showsPrec :: Int -> GrantPermission -> ShowS # show :: GrantPermission -> String # showList :: [GrantPermission] -> ShowS # | |
| Eq GrantPermission Source # | |
Defined in Desktop.Portal.Documents Methods (==) :: GrantPermission -> GrantPermission -> Bool # (/=) :: GrantPermission -> GrantPermission -> Bool # | |
newtype ExtraResults Source #
Constructors
| ExtraResults | |
Fields
| |
Instances
| Show ExtraResults Source # | |
Defined in Desktop.Portal.Documents Methods showsPrec :: Int -> ExtraResults -> ShowS # show :: ExtraResults -> String # showList :: [ExtraResults] -> ShowS # | |
| Eq ExtraResults Source # | |
Defined in Desktop.Portal.Documents | |
Documents Portal Methods
Arguments
| :: 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.
Arguments
| :: 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.
Arguments
| :: 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.
Arguments
| :: 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 #