Safe Haskell | None |
---|---|
Language | Haskell2010 |
Methods for working with File resources on Google Drive.
https://developers.google.com/drive/v2/reference/files
This module is mostly concerned with creating and updating metadata. See
Network.Google.Drive.Upload
for uploading content.
- data File = File {}
- type FileId = Text
- data FileData = FileData {
- fileTitle :: !FileTitle
- fileModified :: !(Maybe UTCTime)
- fileParents :: ![FileId]
- fileTrashed :: !Bool
- fileSize :: !(Maybe Int)
- fileDownloadUrl :: !(Maybe Text)
- fileMimeType :: !MimeType
- fileExportLinks :: !(HashMap MimeType Text)
- type FileTitle = Text
- type MimeType = Text
- newFile :: FileTitle -> Maybe UTCTime -> FileData
- newFolder :: FileTitle -> Maybe UTCTime -> FileData
- setParent :: File -> FileData -> FileData
- setMimeType :: MimeType -> FileData -> FileData
- getFile :: FileId -> Api (Maybe File)
- createFile :: FileData -> Api File
- updateFile :: FileId -> FileData -> Api File
- deleteFile :: File -> Api ()
- downloadFile :: File -> DownloadSink a -> Api (Maybe a)
- isFolder :: File -> Bool
- isDownloadable :: File -> Bool
- localPath :: File -> FilePath
- folderMimeType :: MimeType
File Resource
An existing file
Metadata about Files on your Drive
FileData | |
|
Building File
s
setMimeType :: MimeType -> FileData -> FileData Source
Actions
getFile :: FileId -> Api (Maybe File) Source
Get a File
data by FileId
"root"
can be used to get information on the Drive itself
If the API returns 404, this returns Nothing
createFile :: FileData -> Api File Source
Create a File
from FileData
deleteFile :: File -> Api () Source
Delete a File
downloadFile :: File -> DownloadSink a -> Api (Maybe a) Source
Download a File
Returns Nothing
if the file is not downloadable
Utilities
isDownloadable :: File -> Bool Source
Check if a File
has content stored in drive