Search in sources :

Example 1 with ReadRemoteFolderOperation

use of com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation in project android by owncloud.

the class SynchronizeFolderOperation method fetchRemoteFolder.

/**
     * Get list of files in folder from remote server.
     *
     * @param client      {@link OwnCloudClient} instance used to access the server.
     * @return            Result of the fetch, including list of remote files in the sync'ed folder.
     * @throws OperationCancelledException
     */
@NonNull
private RemoteOperationResult fetchRemoteFolder(OwnCloudClient client) throws OperationCancelledException {
    Log_OC.d(TAG, "Fetching list of files in  " + mAccount.name + mRemotePath + ", if changed");
    if (mCancellationRequested.get()) {
        throw new OperationCancelledException();
    }
    ReadRemoteFolderOperation readFolderOperation = new ReadRemoteFolderOperation(mRemotePath);
    return readFolderOperation.execute(client);
}
Also used : ReadRemoteFolderOperation(com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation) OperationCancelledException(com.owncloud.android.lib.common.operations.OperationCancelledException) NonNull(android.support.annotation.NonNull)

Aggregations

NonNull (android.support.annotation.NonNull)1 OperationCancelledException (com.owncloud.android.lib.common.operations.OperationCancelledException)1 ReadRemoteFolderOperation (com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation)1