 
 class Local
     constructor: (config, @pouch, @events) ->
-        watcher.path = @path = config.path
+        @basePath = config.path
+        @tmpPath  = path.join @basePath, ".cozy-desktop"
+        watcher.path = @basePath
         watcher.publisher = @events
         @other = null
 

                    else
                        @other.createReadStream doc, next

                # Write the file
                # TODO verify the checksum -> remove file if not ok
                # TODO show progress
                (stream, next) ->
                    target = fs.createWriteStream filePath
                    stream.pipe target
                    stream.on 'end', next

                # Change utimes (creation and modification date)
                (next) ->
                    lastModification = new Date doc.lastModification
                    fs.utimes filePath, new Date(), lastModification, next
            ], callback


    createFolder: (doc, callback) =>

    # Remote-to-local operations
    #
    # Steps:
    # * Checks if the doc is valid: has a path and a name
    # * Ensure that the temporary directory exists
    # * Try to find a similar file based on his checksum
    #   (in that case, it just requires a local copy)
    # * Download the linked binary from remote
    # * Write to a temporary file
    # * Ensure parent folder exists
    # * Move the temporay file to its final destination
    # * Update creation and last modification dates
    #
    createFile: (doc, callback) =>
