moveToFolder: Move a document to a folder

moveToFolderR Documentation

Move a document to a folder

Description

This function allows us to move a document, be it a spreadsheet, word processing document, presentation or folder, into a Google Docs folder on the repository.

Usage

moveToFolder(doc, to, con = if (is(doc,"GoogleDocumentDescription")) 
                              doc@connection 
                            else
                              getGoogleDocsConnection())

Arguments

doc

the document (spreadsheet, word processing document, folder, presentation) to be moved. This should be a GoogleDocumentDescription, but can be a name.

to

the folder object of class GoogleFolder, or a name.

con

an authenticated connection to the Google API. See getGoogleDocsConnection.

Value

A GoogleFolder

Author(s)

Duncan Temple Lang

References

http://code.google.com/apis/documents/docs/2.0/developers\_guide\_protocol.html

See Also

addFolder

Examples

if(exists("GoogleDocsPassword")) {
  con = getGoogleDocsConnection()
  a = addFolder("A", con)
  b = addFolder("B", con)
  c = addFolder("C", con)

  moveToFolder(b, a, con)
  moveToFolder(c, a, con)

  f = addFolder(c("One", "Two", "Three"), con)
}

duncantl/RGoogleDocs documentation built on Nov. 23, 2023, 4:22 p.m.