Created
December 7, 2020 01:33
-
-
Save Oaphi/b73c505f5f05118c9ad77d5980bbef32 to your computer and use it in GitHub Desktop.
Drive utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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