+
+ /**
+ * When 'false', uploads to the server are not done; only downloads or conflict detection.
+ * This is a temporal field.
+ * TODO Remove when 'folder synchronization' replaces 'folder download'.
+ */
+ private boolean mAllowUploads;
+
+
+ /**
+ * Constructor for "full synchronization mode".
+ *
+ * Uses remotePath to retrieve all the data both in local cache and in the remote OC server when the operation
+ * is executed, instead of reusing {@link OCFile} instances.
+ *
+ * Useful for direct synchronization of a single file.
+ *
+ * @param
+ * @param account ownCloud account holding the file.
+ * @param syncFileContents When 'true', transference of data will be started by the
+ * operation if needed and no conflict is detected.
+ * @param context Android context; needed to start transfers.
+ */
+ public SynchronizeFileOperation(
+ String remotePath,
+ Account account,
+ boolean syncFileContents,
+ Context context) {
+
+ mRemotePath = remotePath;
+ mLocalFile = null;
+ mServerFile = null;
+ mAccount = account;
+ mSyncFileContents = syncFileContents;
+ mContext = context;
+ mAllowUploads = true;
+ }
+