pyslk.arch_size

Contents

pyslk.arch_size#

pyslk.arch_size(path_or_id: str | int, unit: str = 'B') dict[str, Union[str, float, int]]#

Get archive size from search id or GNS path by recursively listing all files of archive and adding file sizes

Parameters:
  • path_or_id (str) – search id or gns path

  • unit (str) – Prefix of returned size must be one of B, K, M, G, T, P or h for Byte, Kilobyte, Megabyte Gigabyte, Terrabyte, Petabyte or “human-readable”; default: B

Returns:

archive size, in key “value” contains size without unit and key “unit” contains unit

Return type:

dict