Create new instance.
Optional
identifier: stringIf a function fails, this property will contain the last error as a string message, otherwise it will be undefined
.
Reads the contents of the file at the with the file name, in the parent folder, as a string. Returns undefined
value if the file does not exist or could not be read.
Name of folder in the root of the Google Drive, or ""
for root. FIXME: optional?
Write the contents of the file at the path. Returns true if successful, false if the file could not be written successfully. This will override existing files!
Name of folder in the root of the Google Drive, or ""
for root.
Text to write to file.
Static
createCreates a new GoogleDrive object.
Optional
identifier: stringused to identify a GoogleDrive account. Typically this can be omitted if you only work with one GoogleDrive account in Drafts.
GoogleDrive objects can be used to work with files in Google Drive accounts.
Example