Module: FakeFS::FileTest
Overview
FileTest
Instance Method Summary collapse
- #directory?(file_name) ⇒ Boolean
- #executable?(file_name) ⇒ Boolean
- #exist?(file_name) ⇒ Boolean
- #file?(file_name) ⇒ Boolean
- #readable?(file_name) ⇒ Boolean
- #size?(file_name) ⇒ Boolean
- #sticky?(file_name) ⇒ Boolean
- #symlink?(file_name) ⇒ Boolean
- #world_readable?(file_name) ⇒ Boolean
- #world_writable?(file_name) ⇒ Boolean
- #writable?(file_name) ⇒ Boolean
- #zero?(file_name) ⇒ Boolean
Instance Method Details
#directory?(file_name) ⇒ Boolean
6 7 8 |
# File 'lib/fakefs/file_test.rb', line 6 def directory?(file_name) File.directory?(file_name) end |
#executable?(file_name) ⇒ Boolean
10 11 12 |
# File 'lib/fakefs/file_test.rb', line 10 def executable?(file_name) File.executable?(file_name) end |
#exist?(file_name) ⇒ Boolean
14 15 16 |
# File 'lib/fakefs/file_test.rb', line 14 def exist?(file_name) File.exist?(file_name) end |
#file?(file_name) ⇒ Boolean
18 19 20 |
# File 'lib/fakefs/file_test.rb', line 18 def file?(file_name) File.file?(file_name) end |
#readable?(file_name) ⇒ Boolean
26 27 28 |
# File 'lib/fakefs/file_test.rb', line 26 def readable?(file_name) File.readable?(file_name) end |
#size?(file_name) ⇒ Boolean
22 23 24 |
# File 'lib/fakefs/file_test.rb', line 22 def size?(file_name) File.size?(file_name) end |
#sticky?(file_name) ⇒ Boolean
30 31 32 |
# File 'lib/fakefs/file_test.rb', line 30 def sticky?(file_name) File.sticky?(file_name) end |
#symlink?(file_name) ⇒ Boolean
34 35 36 |
# File 'lib/fakefs/file_test.rb', line 34 def symlink?(file_name) File.symlink?(file_name) end |
#world_readable?(file_name) ⇒ Boolean
38 39 40 |
# File 'lib/fakefs/file_test.rb', line 38 def world_readable?(file_name) File.new(file_name).stat.world_readable? end |
#world_writable?(file_name) ⇒ Boolean
42 43 44 |
# File 'lib/fakefs/file_test.rb', line 42 def world_writable?(file_name) File.new(file_name).stat.world_writable? end |