+ public void removeFile(OCFile file, boolean onlyLocalCopy) {
+ // RemoveFile
+ Intent service = new Intent(mFileActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_REMOVE);
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ service.putExtra(OperationsService.EXTRA_REMOVE_ONLY_LOCAL, onlyLocalCopy);
+ mWaitingForOpId = mFileActivity.getOperationsServiceBinder().newOperation(service);
+
+ mFileActivity.showLoadingDialog();
+ }
+
+
+ public void createFolder(String remotePath, boolean createFullPath) {
+ // Create Folder
+ Intent service = new Intent(mFileActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_CREATE_FOLDER);
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, remotePath);
+ service.putExtra(OperationsService.EXTRA_CREATE_FULL_PATH, createFullPath);
+ mWaitingForOpId = mFileActivity.getOperationsServiceBinder().newOperation(service);
+
+ mFileActivity.showLoadingDialog();
+ }
+
+
+ public void cancelTransference(OCFile file) {
+ Account account = mFileActivity.getAccount();
+ FileDownloaderBinder downloaderBinder = mFileActivity.getFileDownloaderBinder();
+ FileUploaderBinder uploaderBinder = mFileActivity.getFileUploaderBinder();
+ if (downloaderBinder != null && downloaderBinder.isDownloading(account, file)) {
+ downloaderBinder.cancel(account, file);
+
+ } else if (uploaderBinder != null && uploaderBinder.isUploading(account, file)) {
+ uploaderBinder.cancel(account, file);
+ }
+ }
+
+
+ public long getOpIdWaitingFor() {
+ return mWaitingForOpId;
+ }
+
+
+ public void setOpIdWaitingFor(long waitingForOpId) {
+ mWaitingForOpId = waitingForOpId;
+ }
+
+