From 2c18e7b679069d434bf329ad482e8dc31a68eeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abel=20Garc=C3=ADa=20de=20Prada?= Date: Tue, 17 Jan 2023 19:07:42 +0100 Subject: [PATCH] Added create folder operation support for specific space --- .../lib/resources/files/CreateRemoteFolderOperation.kt | 3 ++- .../android/lib/resources/files/services/FileService.kt | 3 ++- .../files/services/implementation/OCFileService.kt | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CreateRemoteFolderOperation.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CreateRemoteFolderOperation.kt index 372c8f21..22757409 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CreateRemoteFolderOperation.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/CreateRemoteFolderOperation.kt @@ -46,7 +46,8 @@ import java.util.concurrent.TimeUnit class CreateRemoteFolderOperation( val remotePath: String, private val createFullPath: Boolean, - private val isChunksFolder: Boolean = false + private val isChunksFolder: Boolean = false, + val spaceWebDavUrl: String? = null, ) : RemoteOperation() { override fun run(client: OwnCloudClient): RemoteOperationResult { diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/FileService.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/FileService.kt index 9ebe1994..50f4407f 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/FileService.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/FileService.kt @@ -43,7 +43,8 @@ interface FileService : Service { fun createFolder( remotePath: String, createFullPath: Boolean, - isChunkFolder: Boolean = false + isChunkFolder: Boolean = false, + spaceWebDavUrl: String? = null, ): RemoteOperationResult fun downloadFile( diff --git a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/implementation/OCFileService.kt b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/implementation/OCFileService.kt index e2affc8a..54113b81 100644 --- a/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/implementation/OCFileService.kt +++ b/owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/files/services/implementation/OCFileService.kt @@ -64,12 +64,14 @@ class OCFileService(override val client: OwnCloudClient) : FileService { override fun createFolder( remotePath: String, createFullPath: Boolean, - isChunkFolder: Boolean + isChunkFolder: Boolean, + spaceWebDavUrl: String?, ): RemoteOperationResult = CreateRemoteFolderOperation( remotePath = remotePath, createFullPath = createFullPath, - isChunksFolder = isChunkFolder + isChunksFolder = isChunkFolder, + spaceWebDavUrl = spaceWebDavUrl, ).execute(client) override fun downloadFile(