sfxGoogleDriveExt

Save files to Google Drive
sfxGoogleDriveExt

Registered users on StackHub may elect to receive email notifications whenever new package versions are released.

v1.0.2

Axon functions

sfxGoogleDriveClearKeys
sfxGoogleDriveClearKeys()

This function clears all key values configured for the GDriveExt.

Fantom signature:
@Axon { admin=true; } const static Void sfxGoogleDriveClearKeys()
sfxGoogleDriveDelete
sfxGoogleDriveDelete(fileName)

This function will delete the most recently modified file with the given name.

Fantom signature:
@Axon const static Dict sfxGoogleDriveDelete(Str fileName)
sfxGoogleDriveDeleteByDate
sfxGoogleDriveDeleteByDate(date)

This function will delete all files edited on or before the provided date. The format is: D-M-YYYY

Fantom signature:
@Axon const static Grid sfxGoogleDriveDeleteByDate(Str date)
sfxGoogleDriveDownload
sfxGoogleDriveDownload(fileName, path)

This function will download the most recently modified file with the given file name to the path specified. The path is relative to the current project directory.

Fantom signature:
@Axon const static Dict sfxGoogleDriveDownload(Str fileName, Uri path)
sfxGoogleDriveListFiles
sfxGoogleDriveListFiles()

This function will list the files and their id's that are available for access through the gdriveExt.

Fantom signature:
@Axon const static Grid sfxGoogleDriveListFiles()
sfxGoogleDrivePing
sfxGoogleDrivePing()

This function uses the currently configured keys and checks to see if they are valid.

Fantom signature:
@Axon const static Void sfxGoogleDrivePing()
sfxGoogleDriveShare
sfxGoogleDriveShare(fileName, sharing: null, shareMessage: null)

This function will share the most recently modified file with the given file name with the users specified in the sharing dictionary. It will also specify to send the users upon sharing the file. Configuration on sharing found here

Fantom signature:
@Axon const static Dict sfxGoogleDriveShare(Str fileName, Dict? sharing := null, Str? shareMessage := null)
sfxGoogleDriveUpdate
sfxGoogleDriveUpdate(fileName, filePath: null, fileData: null, sharing: null)

This function finds the most recently modified file with the given file name, and will update that record with the specified file, metadata, and sharing properties. Configuration on fileData found here Configuration on sharing found here

Fantom signature:
@Axon const static Dict sfxGoogleDriveUpdate(Str fileName, Uri? filePath := null, Dict? fileData := null, Dict? sharing := null)
sfxGoogleDriveUpload
sfxGoogleDriveUpload(filePath, fileData: null, sharing: null)

This function takes in a path (relative to the current project) to a file, an optional dictionary of file metadata, and an optional dictionary of a dictionary mapping email addresses to their access capabilities. It will upload the file, write the metadata, and share the file accordingly. Configuration on fileData found here Configuration on sharing found here

Fantom signature:
@Axon const static Dict sfxGoogleDriveUpload(Uri filePath, Dict? fileData := null, Dict? sharing := null)
Published by SkyFoundry

Products & Services by SkyFoundry

Packages by SkyFoundry

Free packages