Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f51f103e authored by narinder Rana's avatar narinder Rana
Browse files

getting code for Download remote file

parent dda9730b
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@
 */
package foundation.e.drive.operations;

import android.util.Log;

import com.owncloud.android.lib.common.OwnCloudClient;
import com.owncloud.android.lib.common.network.WebdavUtils;
import com.owncloud.android.lib.common.operations.OperationCancelledException;
@@ -77,6 +79,7 @@ class DownloadFileRemoteOperation extends RemoteOperation {
            tmpFile.getParentFile().mkdirs();
            int status = downloadFile(client, tmpFile);
            result = new RemoteOperationResult(isSuccess(status), mGet);

            Log_OC.i(TAG, "Download of " + mRemotePath + " to " + getTmpPath() + ": " +
                    result.getLogMessage());

@@ -120,6 +123,9 @@ class DownloadFileRemoteOperation extends RemoteOperation {
                    fos.write(bytes, 0, readResult);
                    transferred += readResult;
                }

                Log.e(TAG, "....line no..127 ..."+targetFile.getName());

                // Check if the file is completed
                // if transfer-encoding: chunked we cannot check if the file is complete
                Header transferEncodingHeader = mGet.getResponseHeader("Transfer-Encoding");