             socket.write_mesg('json', message.error(id:mesg.id, error:err))
     )
 
-move_file_in_project = (socket, mesg) ->
+events.move_file_in_project = (socket, mesg) ->
     user = username(mesg.project_id)
     async.series([
         (c) ->

        if err
            socket.write_mesg('json', message.error(id:mesg.id, error:err))
    )




server = net.createServer (socket) ->
    misc_node.enable_mesg(socket)
    socket.on 'mesg', (type, mesg) ->
        if type == 'json' # other types are handled elsewhere
            switch mesg.event
                when 'open_project'
                    open_project(socket, mesg)
                when 'save_project'
                    save_project(socket, mesg)
                when 'close_project'
                    close_project(socket, mesg)
                when 'read_file_from_project'
                    read_file_from_project(socket, mesg)
                when 'write_file_to_project'
                    write_file_to_project(socket, mesg)
                when 'make_directory_in_project'
                    make_directory_in_project(socket, mesg)
                when 'move_file_in_project'
                    move_file_in_project(socket, mesg)
                when 'remove_file_in_project'
                    remove_file_in_project(socket, mesg)
                else
                    socket.write(message.error("Unknown message event '#{mesg.event}'"))

# Start listening for connections on the socket.
exports.start_server = start_server = () ->

    )

# Write a file to the project
events.write_file_to_project = (socket, mesg) ->
    data_uuid = mesg.data_uuid

    if mesg.path[mesg.path.length-1] == '/'
