diff options
Diffstat (limited to '')
-rw-r--r-- | debian/vendor-h2o/deps/mruby-file-stat/mrblib/ext.rb | 5 | ||||
-rw-r--r-- | debian/vendor-h2o/deps/mruby-file-stat/mrblib/file-stat.rb | 52 |
2 files changed, 0 insertions, 57 deletions
diff --git a/debian/vendor-h2o/deps/mruby-file-stat/mrblib/ext.rb b/debian/vendor-h2o/deps/mruby-file-stat/mrblib/ext.rb deleted file mode 100644 index 1fda186..0000000 --- a/debian/vendor-h2o/deps/mruby-file-stat/mrblib/ext.rb +++ /dev/null @@ -1,5 +0,0 @@ -class File - def self.stat(fname) - File::Stat.new(fname) - end -end diff --git a/debian/vendor-h2o/deps/mruby-file-stat/mrblib/file-stat.rb b/debian/vendor-h2o/deps/mruby-file-stat/mrblib/file-stat.rb deleted file mode 100644 index 23ded17..0000000 --- a/debian/vendor-h2o/deps/mruby-file-stat/mrblib/file-stat.rb +++ /dev/null @@ -1,52 +0,0 @@ -class File - class Stat - include Comparable - - def <=>(other) - if other.kind_of?(self.class) - self.mtime <=> other.mtime - else - nil - end - end - - def inspect - _dev = dev - _dev = "0x#{_dev.to_s(16)}" if _dev.kind_of?(Fixnum) - _mode = mode - _mode = "0#{_mode.to_s(8)}" if _mode.kind_of?(Fixnum) - _rdev = rdev - _rdev = "0x#{_rdev.to_s(16)}" if _rdev.kind_of?(Fixnum) - - stats = { - 'dev' => _dev, - 'ino' => ino, - 'mode' => _mode, - 'nlink' => nlink, - 'uid' => uid, - 'gid' => gid, - 'rdev' => _rdev, - 'size' => size, - 'blksize' => blksize, - 'blocks' => blocks, - 'atime' => atime, - 'mtime' => mtime, - 'ctime' => ctime, - } - if respond_to? :birthtime - stats['birthtime'] = birthtime - end - - "#<#{self.class.to_s} #{stats.map{|k, v| "#{k}=#{v}"}.join(', ')}>" - end - - def size? - s = size - s == 0 ? nil : s - end - - def zero? - size == 0 - end - end -end |