示例#1
0
文件: user.py 项目: pheelixx/konvert
 def get_files_size(self, prefix=None):
     bytes = 0
     for file in self.files:
         bytes += file.size
     size = bytes
     if prefix is not None:
         size = round(Tools.size_metric(bytes, prefix), 3)
     return str(size)
示例#2
0
文件: file.py 项目: pheelixx/konvert
 def get_metric_size(self, prefix):
     from app.components.tools import Tools
     size = round(Tools.size_metric(self.size, prefix), 3)
     return str(size)