pyufunc.get_file_size#

pyufunc.get_file_size(filename, unit='kb')#

Get the size of a file in the specified unit.

Parameters:
  • filename (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