Created
October 26, 2020 05:29
-
-
Save shikumiya-hata/e355133893b4e576ad19ce3abe8164ab to your computer and use it in GitHub Desktop.
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
/** | |
* 共有ドライブにフォルダを作成(ID指定) | |
* @param {string} teamDriveId - 共有ドライブID | |
* @param {string} folderName - フォルダ名 | |
* @return {Folder} - 作成したフォルダ | |
*/ | |
function createFolderById(teamDriveId, folderName) { | |
var parentFolder = DriveApp.getFolderById(teamDriveId) // 対象の共有ドライブを取得(親フォルダとなる) | |
return parentFolder.createFolder(folderName) // 子フォルダを作成 | |
} | |
/** | |
* 共有ドライブにフォルダを作成 | |
* @param {TeamDrive} teamDrive - 親となる共有ドライブ | |
* @param {string} folderName - フォルダ名 | |
* @return {Folder} - 作成したフォルダ | |
*/ | |
function createFolder(teamDrive, folderName) { | |
return createFolderById(teamDrive.id, folderName) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment