google-drive-0.2.0: Google Drive API access

Safe HaskellNone
LanguageHaskell2010

Network.Google.Drive.File

Contents

Description

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.

Synopsis

File Resource

data File Source

Constructors

File FileId FileData

A File that exists

New FileData

A File you intend to create

Instances

data FileData Source

Metadata about Files on your Drive

fileId :: File -> FileId Source

N.B. it is an error to ask for the fileId of a new file

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

data Query Source

Search query parameter

Currently only a small subset of queries are supported

newtype Items Source

Constructors

Items [File] 

Instances

listFiles :: Query -> Api [File] Source

Perform a search as specified by the Query

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

newFile Source

Arguments

:: FileId

Parent

-> FilePath 
-> Api File 

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

createFolder Source

Arguments

:: FileId

Parent

-> Text

Title to give the folder

-> Api File 

Create a new remote folder