Module: DiskUsageExtension

Included in:
Pathname
Defined in:
Library/Homebrew/extend/pathname.rb

Instance Method Summary collapse

Instance Method Details

#abvObject



19
20
21
22
23
24
# File 'Library/Homebrew/extend/pathname.rb', line 19

def abv
  out = ""
  compute_disk_usage
  out << "#{number_readable(@file_count)} files, " if @file_count > 1
  out << disk_usage_readable(@disk_usage).to_s
end

#disk_usageObject



7
8
9
10
11
# File 'Library/Homebrew/extend/pathname.rb', line 7

def disk_usage
  return @disk_usage if @disk_usage
  compute_disk_usage
  @disk_usage
end

#file_countObject



13
14
15
16
17
# File 'Library/Homebrew/extend/pathname.rb', line 13

def file_count
  return @file_count if @file_count
  compute_disk_usage
  @file_count
end