   # Sets the path for the file.
   setPath: (@path) ->
     @realPath = null
+
   # Public: Sets the file encoding name.
   setEncoding: (@encoding) ->
 

    if not @exists()
      @cachedContents = null
    else if not @cachedContents? or flushCache
      content = fs.readFileSync @getPath()
      @cachedContents = iconv.decode content, @getEncoding()

    @setDigest(@cachedContents)
    @cachedContents

  # permission to the path.
  writeFileWithPrivilegeEscalationSync: (filePath, text) ->
    try
      contents = iconv.encode text, @getEncoding()
      fs.writeFileSync filePath, contents
    catch error
      if error.code is 'EACCES' and process.platform is 'darwin'
        runas ?= require 'runas'
