mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 10:27:45 +00:00 
			
		
		
		
	Add move operation to file service
This commit is contained in:
		
							parent
							
								
									c2700389f7
								
							
						
					
					
						commit
						5dc3c0e79b
					
				| @ -46,6 +46,12 @@ interface FileService : Service { | |||||||
|         localTempPath: String |         localTempPath: String | ||||||
|     ): RemoteOperationResult<Unit> |     ): RemoteOperationResult<Unit> | ||||||
| 
 | 
 | ||||||
|  |     fun moveFile( | ||||||
|  |         sourceRemotePath: String, | ||||||
|  |         targetRemotePath: String, | ||||||
|  |         forceOverwrite: Boolean, | ||||||
|  |     ): RemoteOperationResult<Unit> | ||||||
|  | 
 | ||||||
|     fun refreshFolder( |     fun refreshFolder( | ||||||
|         remotePath: String |         remotePath: String | ||||||
|     ): RemoteOperationResult<ArrayList<RemoteFile>> |     ): RemoteOperationResult<ArrayList<RemoteFile>> | ||||||
|  | |||||||
| @ -29,6 +29,7 @@ import com.owncloud.android.lib.resources.files.CheckPathExistenceRemoteOperatio | |||||||
| import com.owncloud.android.lib.resources.files.CreateRemoteFolderOperation | import com.owncloud.android.lib.resources.files.CreateRemoteFolderOperation | ||||||
| import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation | import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation | ||||||
| import com.owncloud.android.lib.resources.files.GetUrlToOpenInWebRemoteOperation | import com.owncloud.android.lib.resources.files.GetUrlToOpenInWebRemoteOperation | ||||||
|  | import com.owncloud.android.lib.resources.files.MoveRemoteFileOperation | ||||||
| import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation | import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation | ||||||
| import com.owncloud.android.lib.resources.files.RemoteFile | import com.owncloud.android.lib.resources.files.RemoteFile | ||||||
| import com.owncloud.android.lib.resources.files.RemoveRemoteFileOperation | import com.owncloud.android.lib.resources.files.RemoveRemoteFileOperation | ||||||
| @ -68,6 +69,17 @@ class OCFileService(override val client: OwnCloudClient) : FileService { | |||||||
|             localFolderPath = localTempPath |             localFolderPath = localTempPath | ||||||
|         ).execute(client) |         ).execute(client) | ||||||
| 
 | 
 | ||||||
|  |     override fun moveFile( | ||||||
|  |         sourceRemotePath: String, | ||||||
|  |         targetRemotePath: String, | ||||||
|  |         forceOverwrite: Boolean | ||||||
|  |     ): RemoteOperationResult<Unit> = | ||||||
|  |         MoveRemoteFileOperation( | ||||||
|  |             sourceRemotePath = sourceRemotePath, | ||||||
|  |             targetRemotePath = targetRemotePath, | ||||||
|  |             forceOverwrite = forceOverwrite | ||||||
|  |         ).execute(client) | ||||||
|  | 
 | ||||||
|     override fun refreshFolder(remotePath: String): RemoteOperationResult<ArrayList<RemoteFile>> = |     override fun refreshFolder(remotePath: String): RemoteOperationResult<ArrayList<RemoteFile>> = | ||||||
|         ReadRemoteFolderOperation( |         ReadRemoteFolderOperation( | ||||||
|             remotePath = remotePath |             remotePath = remotePath | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user