Class DriveItemFolderType
java.lang.Object
com.amilesend.onedrive.resource.DriveItemType
com.amilesend.onedrive.resource.DriveItemFolderType
- Direct Known Subclasses:
DriveFolder, DrivePackage
Defines shared operations between drive folders and packages.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFolder(String name) Creates a new folder with the givennameunder this folder.Gets the list of child drive files under this folder.Gets the list of child drive folders under this folder.Gets the list of child drive packages under this folder.List<? extends DriveItemType> Gets the list of drive items (both folders and files) under this folder.move(@NonNull DriveFolder destinationFolder, String newName) Moves this folder to the specifiedDriveFolderalong with the new file name.move(DriveFolder destinationFolder) Moves this folder to the specifiedDriveFolder.Moves this folder to the specifiednewParentId(i.e., represents a new DriveFolder's ID) along with the new folder name.List<? extends DriveItemType> Searches this folder for the given query (e.g., file name).update()Updates the attributes for this folder.Deprecated.Deprecated.useupload(Path, TransferProgressCallback)insteadUploads the givenfileunder this folder.Uploads the givenfileunder this folder and reports transfer progress to the specifiedTransferProgressCallback.uploadAsync(File file) Deprecated.useuploadAsync(Path)insteaduploadAsync(File file, com.amilesend.client.connection.file.TransferProgressCallback callback) Deprecated.useuploadAsync(Path, TransferProgressCallback)insteaduploadAsync(Path filePath) Uploads the givenfileasynchronously under this folder.uploadAsync(Path filePath, com.amilesend.client.connection.file.TransferProgressCallback callback) Uploads the givenfileasynchronously under this folder and reports transfer progress to the specifiedTransferProgressCallback.Methods inherited from class DriveItemType
addPermission, copy, copy, copy, copy, createSharingLink, delete, equals, getActivities, getCreatedBy, getCreatedDateTime, getETag, getFileSystemInfo, getId, getLastModifiedBy, getLastModifiedDateTime, getName, getPackage, getParentReference, getPermissions, getRemoteItem, getThumbnails, getVersions, hashCode, isDeleted, isFile, isFolder, isPackage, isRemote, setFileSystemInfoModifier and TypeMethodDescriptionaddPermission(AddPermissionRequest request) Adds a permission for the given request.copy(@NonNull DriveFolder destinationFolder, String newName) Copies this drive item type to the specifiedDriveFolderalong with the new file name.copy(DriveFolder destinationFolder) Copies this drive item type to the specifiedDriveFolder.Copies this drive item type to the specifiednewNamewithin the same folder.Copies this drive item type to the specifiednewParentId(i.e., represents a new DriveFolder's ID) along with the new file name.Creates a sharing link for the given request.voiddelete()Mark this drive item type for deletion.booleanGets the list of activities associated with this drive item.Gets the identity set that indicates who created this drive item.Gets the timestamp (formatted as a string) that indicates when this drive item was created.getETag()Gets the eTag associated with this item.Gets the local file system information associated with this drive item.getId()Gets the drive item identifier.Gets the identity set that indicates who made the last modification to this drive item.Gets the timestamp (formatted as a string) that indicates when this drive item was modified.getName()Gets the name of this drive item.Gets the package information associated with this drive item.Gets the parent reference of this drive item.Gets the list of permissions associated with this drive item.Gets the remote item information.Gets the list thumbnails associated with this drive item.Gets the list of versions for this drive item.inthashCode()booleanDescribes if this drive item has been marked for deletion.booleanisFile()Describes if this is a file.booleanisFolder()Describes if this is a folder.booleanDescribes if this is a package.booleanisRemote()Describes if this drive item represents a remote item from another drive.voidsetFileSystemInfo(@NonNull FileSystemInfo fileSystemInfo) Sets the local file system information associated with this drive item.
-
Constructor Details
-
DriveItemFolderType
-
-
Method Details
-
upload
Deprecated.useupload(Path)insteadUploads the givenfileunder this folder.- Parameters:
file- the file to upload- Returns:
- the drive file that represents the uploaded file
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
upload
Uploads the givenfileunder this folder.- Parameters:
filePath- the file to upload- Returns:
- the drive file that represents the uploaded file
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
upload
@Deprecated public DriveFile upload(File file, com.amilesend.client.connection.file.TransferProgressCallback callback) throws IOException Deprecated.useupload(Path, TransferProgressCallback)insteadUploads the givenfileunder this folder and reports transfer progress to the specifiedTransferProgressCallback.- Parameters:
file- the file to uploadcallback- the callback be notified of transfer progress- Returns:
- the drive file that represents the uploaded file
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
upload
public DriveFile upload(Path filePath, com.amilesend.client.connection.file.TransferProgressCallback callback) throws IOException Uploads the givenfileunder this folder and reports transfer progress to the specifiedTransferProgressCallback.- Parameters:
filePath- the file to uploadcallback- the callback be notified of transfer progress- Returns:
- the drive file that represents the uploaded file
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
uploadAsync
Deprecated.useuploadAsync(Path)insteadUploads the givenfileasynchronously under this folder.- Parameters:
file- the file to upload- Returns:
- the async execution used to obtain the drive file once it has completed
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
uploadAsync
Uploads the givenfileasynchronously under this folder.- Parameters:
filePath- the file to upload- Returns:
- the async execution used to obtain the drive file once it has completed
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
uploadAsync
@Deprecated public DriveFileUploadExecution uploadAsync(File file, com.amilesend.client.connection.file.TransferProgressCallback callback) throws IOException Deprecated.useuploadAsync(Path, TransferProgressCallback)insteadUploads the givenfileasynchronously under this folder and reports transfer progress to the specifiedTransferProgressCallback.- Parameters:
file- the file to uploadcallback- the callback be notified of transfer progress- Returns:
- the async execution used to obtain the drive file once it has completed
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
uploadAsync
public DriveFileUploadExecution uploadAsync(Path filePath, com.amilesend.client.connection.file.TransferProgressCallback callback) throws IOException Uploads the givenfileasynchronously under this folder and reports transfer progress to the specifiedTransferProgressCallback.- Parameters:
filePath- the file to uploadcallback- the callback be notified of transfer progress- Returns:
- the async execution used to obtain the drive file once it has completed
- Throws:
IOException- if an error occurred while uploading the file- See Also:
-
createFolder
Creates a new folder with the givennameunder this folder.- Parameters:
name- the name of the new folder- Returns:
- the new drive folder
-
getChildPackages
Gets the list of child drive packages under this folder.- Returns:
- the list of drive packages
-
getChildFolders
Gets the list of child drive folders under this folder.- Returns:
- the list of drive folders
-
getChildFiles
-
getChildren
Gets the list of drive items (both folders and files) under this folder.- Returns:
- the list of drive items
- See Also:
-
search
Searches this folder for the given query (e.g., file name).- Parameters:
query- the search query- Returns:
- the list of drive item types (either a DriveFolder or DriveFile).
- See Also:
-
update
Updates the attributes for this folder.- Returns:
- the updated drive folder
-
move
Moves this folder to the specifiedDriveFolder.- Parameters:
destinationFolder- the destination drive folder- Returns:
- the updated drive file that represents this moved file
-
move
Moves this folder to the specifiedDriveFolderalong with the new file name.- Parameters:
destinationFolder- the destination drive foldernewName- the new name of the file- Returns:
- the updated drive folder that represents this moved folder
-
move
Moves this folder to the specifiednewParentId(i.e., represents a new DriveFolder's ID) along with the new folder name.- Parameters:
destinationParentId- the new parent destination IDnewName- the new name of the file- Returns:
- the updated drive folder that represents this moved folder
-
upload(Path)instead