Class: Pathname

Inherits:
Object show all
Defined in:
lib/sup/util.rb

Instance Method Summary collapse

Instance Method Details

#human_sizeObject



49
50
51
52
53
54
55
56
57
# File 'lib/sup/util.rb', line 49

def human_size
  s =
    begin
      size
    rescue SystemCallError
      return "?"
    end
  s.to_human_size
end

#human_timeObject



59
60
61
62
63
64
65
# File 'lib/sup/util.rb', line 59

def human_time
  begin
    ctime.strftime("%Y-%m-%d %H:%M")
  rescue SystemCallError
    "?"
  end
end