Module: DiskUsageExtension

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

Instance Method Summary collapse

Instance Method Details

#abvObject



21
22
23
24
25
26
27
# File 'brew/Library/Homebrew/extend/pathname.rb', line 21

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

#disk_usageObject



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

def disk_usage
  return @disk_usage if @disk_usage

  compute_disk_usage
  @disk_usage
end

#file_countObject



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

def file_count
  return @file_count if @file_count

  compute_disk_usage
  @file_count
end