您需要使用parent参数将文件插入到文件夹中。有关更多详细信息,请访问https://developers.google.com/drive/v2/reference/files/insert
像这样
File body = new File(); body.setTitle(fileContent.getName());body.setMimeType("text/plain");body.setParents(Arrays.asList(new File.ParentReference().setId(parentId)); File file = service.files().insert(body, textContent).execute();


