Sha256: 093e4c01e3ce6678638e281f3562345565cf474f1b7dd2bf7960da85a6a58f4e

Contents?: true

Size: 268 Bytes

Versions: 47

Compression:

Stored size: 268 Bytes

Contents

unless File.method_defined? :size
  class File
    def size
      stat.size
    end
  end
end

if RUBY_VERSION < '1.9'
  require 'backports/tools/path'

  Backports.convert_first_argument_to_path File, :size?
  Backports.convert_first_argument_to_path File, :size
end

Version data entries

47 entries across 47 versions & 4 rubygems

Version Path
backports-3.25.0 lib/backports/1.9.1/file/size.rb
backports-3.24.1 lib/backports/1.9.1/file/size.rb
backports-3.24.0 lib/backports/1.9.1/file/size.rb
backports-3.23.0 lib/backports/1.9.1/file/size.rb
backports-3.22.1 lib/backports/1.9.1/file/size.rb
backports-3.22.0 lib/backports/1.9.1/file/size.rb
backports-3.21.0 lib/backports/1.9.1/file/size.rb
backports-3.20.2 lib/backports/1.9.1/file/size.rb
backports-3.20.1 lib/backports/1.9.1/file/size.rb
backports-3.20.0 lib/backports/1.9.1/file/size.rb
backports-3.19.0 lib/backports/1.9.1/file/size.rb
backports-3.18.2 lib/backports/1.9.1/file/size.rb
backports-3.18.1 lib/backports/1.9.1/file/size.rb
backports-3.18.0 lib/backports/1.9.1/file/size.rb
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/backports-3.12.0/lib/backports/1.9.1/file/size.rb
backports-3.17.2 lib/backports/1.9.1/file/size.rb
backports-3.17.1 lib/backports/1.9.1/file/size.rb
backports-3.17.0 lib/backports/1.9.1/file/size.rb
backports-3.16.1 lib/backports/1.9.1/file/size.rb
backports-3.16.0 lib/backports/1.9.1/file/size.rb