   return callback createNotFoundError(asarPath, filePath) unless stats
 
   callback undefined, asarStatsToFsStats stats
+
+statSync = fs.statSync
+fs.statSync = (p) ->
+  [isAsar, asarPath, filePath] = splitPath p
+  return statSync p unless isAsar
+
+  # Do not distinguish links for now.
+  fs.lstatSync p
+
+stat = fs.stat
+fs.stat = (p, callback) ->
+  [isAsar, asarPath, filePath] = splitPath p
+  return stat p, callback unless isAsar
+
+  # Do not distinguish links for now.
+  fs.lstat p, callback
 
 statSyncNoException = fs.statSyncNoException
 fs.statSyncNoException = (p) ->

  info = archive.getFileInfo filePath
  throw createNotFoundError(asarPath, filePath) unless info

  buffer = new Buffer(info.size)
  fd = fs.openSync archive.path, 'r'
  fs.readSync fd, buffer, 0, info.size, info.offset
  fs.closeSync fd
  buffer

  archive.stat(filePath) isnt false

readFile = fs.readFile
fs.readFile = (p, options, callback) ->
  [isAsar, asarPath, filePath] = splitPath p
  return readFile.apply this, arguments unless isAsar

