     }
     
     func replace(URL url: NSURL, backupName: String? = nil, options: NSFileManagerItemReplacementOptions = nil) -> ObjectResult<NSURL> {
-        var newURL: NSURL?
-        var error: NSError?
-        if NSFileManager.currentManager.replaceItemAtURL(url, withItemAtURL: self, backupItemName: backupName, options: options, resultingItemURL: &newURL, error: &error) {
-            return success(newURL!)
-        } else {
-            return failure(error!)
-        }
+        return try(replace(item: url, backupName: backupName, options: options))
     }
     
     func link(toURL url: NSURL) -> VoidResult {

    }
    
    func trash() -> ObjectResult<NSURL> {
        var newURL: NSURL?
        var error: NSError?
        if NSFileManager.currentManager.trashItemAtURL(self, resultingItemURL: &newURL, error: &error) {
            return success(newURL!)
        } else {
            return failure(error!)
        }
    }
    
    // MARK: Directory enumeration

        return NSFileManager.currentManager.moveItemAtURL(self, toURL: url, error: error)
    }
    
    private func replace(item url: NSURL, backupName: String?, options: NSFileManagerItemReplacementOptions)(resultingItemURL: AutoreleasingUnsafeMutablePointer<NSURL?>, error: NSErrorPointer) -> Bool {
        return NSFileManager.currentManager.replaceItemAtURL(url, withItemAtURL: self, backupItemName: backupName, options: options, resultingItemURL: resultingItemURL, error: error)
    }

    private func link(toURL url: NSURL)(error: NSErrorPointer) -> Bool {
        return NSFileManager.currentManager.linkItemAtURL(self, toURL: url, error: error)
    }
