get_total_file_size

pyR2D2.util.get_total_file_size(directory, unit=None)[source]

Evaluate total size of files in directory.

Parameters:
  • directory (str) – directory path

  • unit (str) – unit of file size. Choose from ‘B’, ‘kB’, ‘MB’, ‘GB’, ‘TB’, ‘PB’.

Returns:

total size of files in directory in bytes

Return type:

total_size (int)