From: masensio Date: Wed, 27 Nov 2013 13:50:16 +0000 (+0100) Subject: Merge branch 'develop' into refactor_remote_operation_to_read_folder X-Git-Tag: oc-android-1.5.5~116^2~6 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/5aaa4e10e8bad5d12d3f7cfa319ab59428c2fe7f?ds=inline;hp=-c Merge branch 'develop' into refactor_remote_operation_to_read_folder Conflicts: oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java --- 5aaa4e10e8bad5d12d3f7cfa319ab59428c2fe7f diff --combined oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java index 44baf73c,12330a9a..1d7b485e --- a/oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java +++ b/oc_framework-test-project/src/com/owncloud/android/oc_framework_test_project/TestActivity.java @@@ -4,7 -4,7 +4,8 @@@ import com.owncloud.android.oc_framewor import com.owncloud.android.oc_framework.network.webdav.WebdavClient; import com.owncloud.android.oc_framework.operations.RemoteOperationResult; import com.owncloud.android.oc_framework.operations.remote.CreateRemoteFolderOperation; +import com.owncloud.android.oc_framework.operations.remote.ReadRemoteFileOperation; + import com.owncloud.android.oc_framework.operations.remote.RemoveRemoteFileOperation; import com.owncloud.android.oc_framework.operations.remote.RenameRemoteFileOperation; import android.net.Uri; @@@ -45,8 -45,8 +46,8 @@@ public class TestActivity extends Activ /** * Access to the library method to Create a Folder - * @param remotePath - * @param createFullPath + * @param remotePath Full path to the new directory to create in the remote server. + * @param createFullPath 'True' means that all the ancestor folders should be created if don't exist yet. * * @return */ @@@ -76,18 -76,19 +77,32 @@@ return result; } + /** + * Access to the library method to Remove a File or Folder + * + * @param remotePath Remote path of the file or folder in the server. + * @return + */ + public RemoteOperationResult removeFile(String remotePath) { + + RemoveRemoteFileOperation removeOperation = new RemoveRemoteFileOperation(remotePath); + RemoteOperationResult result = removeOperation.execute(mClient); + + return result; + } + + /** + * Access to the library method to Read a File or Folder (PROPFIND DEPTH 1) + * @param remotePath + * + * @return + */ + public RemoteOperationResult readFile(String remotePath) { + + ReadRemoteFileOperation readOperation= new ReadRemoteFileOperation(remotePath); + RemoteOperationResult result = readOperation.execute(mClient); - ++ + return result; + } }