private String importSingleFolder(Drive driveInterface, String folderName, String parentId)
      throws IOException, InvalidTokenException, DestinationMemoryFullException {
    File newFolder = new File().setName(folderName).setMimeType(DriveExporter.FOLDER_MIME_TYPE);
    if (!Strings.isNullOrEmpty(parentId)) {
      newFolder.setParents(ImmutableList.of(parentId));
    }

    try {
      return driveInterface.files().create(newFolder).execute().getId();
    } catch (TokenResponseException e) {
      TokenErrorResponse details = e.getDetails();
      if (details != null && details.getError().equals("invalid_grant")) {
        throw new InvalidTokenException("Unable to refresh token.", e);
      }
      throw e;
    } catch (GoogleJsonResponseException e) {
      if (e.getStatusCode() == 403
          && e.getMessage().contains("storage quota has been exceeded")) {
        throw new DestinationMemoryFullException("Destination Google Drive storage was full", e);
      }
      throw e;
    }
  }
An {@link Importer} to import data to Google Drive.
extensions/data-transfer/portability-data-transfer-google/src/main/java/org/datatransferproject/datatransfer/google/drive/DriveImporter.java