Safe Haskell | None |
---|---|
Language | Haskell2010 |
Methods for working with File resources on Google Drive.
https://developers.google.com/drive/v2/reference/files
See Network.Google.Drive.Upload
for uploading files.
- data File
- type FileId = Text
- data FileData = FileData {
- fileTitle :: !Text
- fileModified :: !UTCTime
- fileParents :: ![FileId]
- fileTrashed :: !Bool
- fileSize :: !(Maybe Int)
- fileDownloadUrl :: !(Maybe Text)
- fileMimeType :: !Text
- fileId :: File -> FileId
- fileData :: File -> FileData
- isFolder :: File -> Bool
- localPath :: File -> FilePath
- uploadMethod :: File -> Method
- uploadPath :: File -> Path
- uploadData :: File -> FileData
- data Query
- newtype Items = Items [File]
- listFiles :: Query -> Api [File]
- getFile :: FileId -> Api File
- deleteFile :: File -> Api ()
- newFile :: FileId -> FilePath -> Api File
- createFolder :: FileId -> Text -> Api File
File Resource
Metadata about Files on your Drive
FileData | |
|
localPath :: File -> FilePath Source
What to name this file if downloaded
Currently just the fileTitle
uploadMethod :: File -> Method Source
HTTP Method to use for uploading content for this file
uploadPath :: File -> Path Source
Path to use for uploading content for this file
uploadData :: File -> FileData Source
HTTP Body to send when uploading content for this file
Currently a synonym for fileData
.
Search
Search query parameter
Currently only a small subset of queries are supported
Actions
getFile :: FileId -> Api File Source
Get File
data by FileId
"root"
can be used to get information on the Drive itself
deleteFile :: File -> Api () Source
Delete a File
Utilities
Build a new File
N.B. This does not create the file.
The file is defined as within the given parent, and has some information (currently title and modified) taken from the local file