                 self.delegateNotify(operation, error: error)
             }
         }
+        
+        let dest = self.url(of: toPath)
+        if /* fileExists */ ((try? dest.checkResourceIsReachable()) ?? false) ||
+            ((try? dest.checkPromisedItemIsReachable()) ?? false) {
+            if overwrite {
+                self.removeItem(path: toPath, completionHandler: { _ in
+                    self.operation_queue.addOperation(moveblock)
+                })
+            } else {
+                let e = self.cocoaError(dest.path, code: .fileWriteFileExists)
+                dispatch_queue.async {
+                    completionHandler?(e)
+                }
+                self.delegateNotify(operation, error: e)
+                return nil
+            }
+        } else {
+            self.operation_queue.addOperation(moveblock)
+        }
+        
         return progress
     }
     

        }
    }
    
    /// Removes local copy of file, but spares cloud copy.
    /// - Parameter path: Path of file or directory to be removed from local
    /// - Parameter completionHandler: If an error parameter was provided, a presentable `Error` will be returned.
    open func evictItem(path: String, completionHandler: SimpleCompletionHandler) {
        operation_queue.addOperation {
            do {


/// Scope of iCloud, wrapper for NSMetadataQueryUbiquitous...Scope constants
public enum UbiquitousScope: RawRepresentable {
    /**
     Search all files not in the Documents directories of the app’s iCloud container directories.
     Use this scope to store user-related data files that your app needs to share
     but that are not files you want the user to manipulate directly.
     
     Raw value is equivalent to `NSMetadataQueryUbiquitousDataScope`
    */
    case data
    
    /**
     Search all files in the Documents directories of the app’s iCloud container directories.
     Put documents that the user is allowed to access inside a Documents subdirectory.
     
     Raw value is equivalent to `NSMetadataQueryUbiquitousDocumentsScope`
    */
    case documents
    
    public typealias RawValue = String
