Closed jebuth closed 3 years ago
gdrive.files.newMetadataOnlyUploader()
.setRequestBody({
name: "folder",
mimeType: MimeTypes.FOLDER,
parents: ["root"]
})
.execute()
creates a folder.
gdrive.files.createIfNotExists({
q: new ListQueryBuilder()
.e("name", "condition_folder")
.and()
.e("mimeType", MimeTypes.FOLDER)
.and()
.in("root", "parents")
},
gdrive.files.newMetadataOnlyUploader()
.setRequestBody({
name: "condition_folder",
mimeType: MimeTypes.FOLDER,
parents: ["root"]
}
)
)
if it doesn't exist.
Thank you!
You're welcome.
how can we create new folders in drive? previously this was the method:
let response = await GDrive.files.safeCreateFolder({ name: GLOBAL.GOOGLE_DRIVE.TARGET_FOLDER_NAME, parents: ['root'], });