Sha256: 89696311085c90e4bc6888df39ffe380b522975f0383436f025d0d0785b530e7

Contents?: true

Size: 627 Bytes

Versions: 17

Compression:

Stored size: 627 Bytes

Contents

module FakeFS
  # FileTest
  module FileTest
    extend self

    def exist?(file_name)
      File.exist?(file_name)
    end

    def directory?(file_name)
      File.directory?(file_name)
    end

    def file?(file_name)
      File.file?(file_name)
    end

    def size?(file_name)
      File.size?(file_name)
    end

    def readable?(file_name)
      File.readable?(file_name)
    end

    def writable?(file_name)
      File.writable?(file_name)
    end

    def zero?(file_name)
      File.zero?(file_name)
    end

    if RUBY_VERSION > '2.4'
      class << self
        alias empty? zero?
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
fakefs-0.19.2 lib/fakefs/file_test.rb
fakefs-0.19.1 lib/fakefs/file_test.rb
fakefs-0.19.0 lib/fakefs/file_test.rb
fakefs-0.18.1 lib/fakefs/file_test.rb
fakefs-0.18.0 lib/fakefs/file_test.rb
fakefs-0.17.0 lib/fakefs/file_test.rb
fakefs-0.16.0 lib/fakefs/file_test.rb
fakefs-0.15.0 lib/fakefs/file_test.rb
fakefs-0.14.3 lib/fakefs/file_test.rb
fakefs-0.14.2 lib/fakefs/file_test.rb
fakefs-0.14.1 lib/fakefs/file_test.rb
fakefs-0.14.0 lib/fakefs/file_test.rb
fakefs-0.13.3 lib/fakefs/file_test.rb
fakefs-0.13.2 lib/fakefs/file_test.rb
fakefs-0.13.1 lib/fakefs/file_test.rb
fakefs-0.13.0 lib/fakefs/file_test.rb
fakefs-0.12.0 lib/fakefs/file_test.rb