Method: FakeFS::File.size
- Defined in:
- lib/fakefs/file.rb
.size(path) ⇒ Object
120 121 122 123 124 125 126 |
# File 'lib/fakefs/file.rb', line 120 def self.size(path) if directory?(path) DEFAULT_DIR_SIZE + (DIR_ENTRY_SIZE * FileSystem.find(path).entries.size) else read(path).bytesize end end |