pyufunc.size_of_file#

pyufunc.size_of_file(fname, unit='kb')#

Get the size of a file in the specified unit.

Parameters:
  • fname (str) – The filename of the file to get the size of.

  • unit (str, optional) – the unit for the filesize (‘kb’, ‘mb’, ‘gb’, ‘tb’) . Defaults to “kb”.

Returns:

the size of the file in the specified unit.

Return type:

str