Google drive api 如何使用google drive api v3&;在google drive中创建子目录(文件夹);php?

Google drive api 如何使用google drive api v3&;在google drive中创建子目录(文件夹);php?,google-drive-api,Google Drive Api,我有一个名为summary的文件夹在我的Google Drive帐户的根目录中。我想做的是创建一个子文件夹下的总结称为一月,所以我有这样的东西 根 ->摘要 --->一月 我怎样才能做到这一点 在Google\u Service\u Drive\u DriveFile对象中添加parents参数 $folderId = 'drive folder(summary) id'; $fileMetadata = new Google_Service_Drive_DriveFile(array(

我有一个名为summary的文件夹在我的Google Drive帐户的根目录中。我想做的是创建一个子文件夹下的总结称为一月,所以我有这样的东西


->摘要
--->一月


我怎样才能做到这一点

Google\u Service\u Drive\u DriveFile对象中添加parents参数

$folderId = 'drive folder(summary) id';  
$fileMetadata = new Google_Service_Drive_DriveFile(array(
        'name' => 'january',
        'mimeType' => 'application/vnd.google-apps.folder',
        'parents' => array($folderId) //to create sub dir. under summary folder
));
$file = $driveService->files->create($fileMetadata, array('fields' => 'id'));

$fileMetadata应为$folderInfo。还是不适合我,但是谢谢。谷歌开始让我生气了!