# File lib/fakefs/file.rb, line 164 def self.read(path, *args) options = args[-1].is_a?(Hash) ? args.pop : {} length = args.size > 0 ? args.shift : nil offset = args.size > 0 ? args.shift : 0 file = new(path, options) fail Errno::ENOENT unless file.exists? fail Errno::EISDIR, path if directory?(path) FileSystem.find(path).atime = Time.now file.seek(offset) file.read(length) end