Skip to content

Instantly share code, notes, and snippets.

@Oaphi
Created December 7, 2020 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oaphi/b73c505f5f05118c9ad77d5980bbef32 to your computer and use it in GitHub Desktop.
Save Oaphi/b73c505f5f05118c9ad77d5980bbef32 to your computer and use it in GitHub Desktop.
Drive utilities
const getFolderByName = (name: string, create = false) => {
const iter = DriveApp.getFoldersByName(name);
return iter.hasNext()
? iter.next()
: create
? DriveApp.createFolder(name)
: null;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment