@Test public void createNewFileTest() { assertNotNull(driveHelper.createNewFile(anyString(), anyString(), anyString())); assertNotNull(driveHelper.createNewFile("file name", null, null)); }
public com.google.api.services.drive.model.File createNewFile(@NonNull String name, @Nullable String mimeType, @Nullable String parentId) { com.google.api.services.drive.model.File file; file = new com.google.api.services.drive.model.File() .setName(name) .setViewersCanCopyContent(true); if (mimeType != null) { file.setMimeType(mimeType); } if (parentId != null) { file.setParents(Collections.singletonList(parentId)); } return file; }
DriveHelper { public com.google.api.services.drive.model.File createNewFile(@NonNull String name, @Nullable String mimeType, @Nullable String parentId) { com.google.api.services.drive.model.File file; file = new com.google.api.services.drive.model.File() .setName(name) .setViewersCanCopyContent(true); if (mimeType != null) { file.setMimeType(mimeType); } if (parentId != null) { file.setParents(Collections.singletonList(parentId)); } return file; } }
DriveHelper { public com.google.api.services.drive.model.File createNewFile(@NonNull String name, @Nullable String mimeType, @Nullable String parentId) { com.google.api.services.drive.model.File file; file = new com.google.api.services.drive.model.File() .setName(name) .setViewersCanCopyContent(true); if (mimeType != null) { file.setMimeType(mimeType); } if (parentId != null) { file.setParents(Collections.singletonList(parentId)); } return file; } DriveHelper(@NonNull GoogleAccountCredential credential,
                @NonNull HttpTransport transport,
                @NonNull JsonFactory jsonFactory);   DriveHelper(DriveService driveService); }
DriveHelper { public com.google.api.services.drive.model.File createNewFile(@NonNull String name, @Nullable String mimeType, @Nullable String parentId) { com.google.api.services.drive.model.File file; file = new com.google.api.services.drive.model.File() .setName(name) .setViewersCanCopyContent(true); if (mimeType != null) { file.setMimeType(mimeType); } if (parentId != null) { file.setParents(Collections.singletonList(parentId)); } return file; } DriveHelper(@NonNull GoogleAccountCredential credential,
                @NonNull HttpTransport transport,
                @NonNull JsonFactory jsonFactory);   DriveHelper(DriveService driveService); String getRootFolderId(); @Nullable Drive.Files.List buildRequest(String query, String fields); void downloadFile(@NonNull String fileId, @NonNull File file); String createOrGetIDOfSubmissionsFolder(); @Nullable String getIDOfFolderWithName(@NonNull String name, @Nullable String inFolder, boolean shouldCreateIfNotFound); String uploadFileToDrive(String mediaName, String destinationFolderID, File toUpload); String createFolderInDrive(@NonNull String folderName,
                                      @Nullable String parentId); com.google.api.services.drive.model.File createNewFile(@NonNull String name,
                                                                  @Nullable String mimeType,
                                                                  @Nullable String parentId); List<com.google.api.services.drive.model.File> getFilesFromDrive(
            @Nullable String folderName,
            @Nullable String parentId); @Nullable String generateSearchQuery(@Nullable String folderName,
                                      @Nullable String parentId,
                                      @Nullable String mimeType); void fetchFilesForCurrentPage(Drive.Files.List request, List<com.google.api.services.drive.model.File> files); }
DriveHelper { public com.google.api.services.drive.model.File createNewFile(@NonNull String name, @Nullable String mimeType, @Nullable String parentId) { com.google.api.services.drive.model.File file; file = new com.google.api.services.drive.model.File() .setName(name) .setViewersCanCopyContent(true); if (mimeType != null) { file.setMimeType(mimeType); } if (parentId != null) { file.setParents(Collections.singletonList(parentId)); } return file; } DriveHelper(@NonNull GoogleAccountCredential credential,
                @NonNull HttpTransport transport,
                @NonNull JsonFactory jsonFactory);   DriveHelper(DriveService driveService); String getRootFolderId(); @Nullable Drive.Files.List buildRequest(String query, String fields); void downloadFile(@NonNull String fileId, @NonNull File file); String createOrGetIDOfSubmissionsFolder(); @Nullable String getIDOfFolderWithName(@NonNull String name, @Nullable String inFolder, boolean shouldCreateIfNotFound); String uploadFileToDrive(String mediaName, String destinationFolderID, File toUpload); String createFolderInDrive(@NonNull String folderName,
                                      @Nullable String parentId); com.google.api.services.drive.model.File createNewFile(@NonNull String name,
                                                                  @Nullable String mimeType,
                                                                  @Nullable String parentId); List<com.google.api.services.drive.model.File> getFilesFromDrive(
            @Nullable String folderName,
            @Nullable String parentId); @Nullable String generateSearchQuery(@Nullable String folderName,
                                      @Nullable String parentId,
                                      @Nullable String mimeType); void fetchFilesForCurrentPage(Drive.Files.List request, List<com.google.api.services.drive.model.File> files); static final String ODK_GOOGLE_DRIVE_ROOT_FOLDER_NAME; static final String ODK_GOOGLE_DRIVE_SUBMISSION_FOLDER_NAME; static final String FOLDER_MIME_TYPE; }