     JSON.stringify
       data: @data
       mtime: @mtime
+      mode: @mode
 
 # Helper object. Used by some FileSources to maintain an index of files.
 class FileIndex

class DoppioFile
  @fromJSON: (path, rawData) ->
    data = JSON.parse rawData
    new DoppioFile(path, data.data, data.mtime)

  constructor: (@path, @data = "", @mtime = (new Date).getTime(), @mod = false, @mode = 0o644) ->


    return true
  chmod: (path, access, cb) ->
    try
      rv = root.fs.chmodSync path, access
      cb null, rv
    catch e
      cb e
