Method: Inspec::Resources::FileSystemResource#size

Defined in:
lib/resources/filesystem.rb

#sizeObject



54
55
56
57
58
59
60
61
62
63
64
# File 'lib/resources/filesystem.rb', line 54

def size
  Inspec.deprecate(:filesystem_property_size, 'The `size` property did not reliably use the correct units.  Please use `size_kb` instead.')
  if inspec.os.windows?
    # On windows, we had a bug prior to #3767 in which the
    # 'size' value was be scaled to GB in powershell.
    # We now collect it in KB.
    (size_kb / (1024 * 1024)).to_i
  else
    size_kb
  end
end