MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / ToSize

Function ToSize

tools.py:551–556  ·  view source on GitHub ↗
(size)

Source from the content-addressed store, hash-verified

549
550# 字节单位转换
551def ToSize(size):
552 ds = ['b', 'KB', 'MB', 'GB', 'TB']
553 for d in ds:
554 if size < 1024: return str(size) + d
555 size = size / 1024
556 return '0b'
557
558
559# 随机面板用户名

Callers 4

ClearSystemFunction · 0.70
ClearMailFunction · 0.70
ClearSessionFunction · 0.70
ClearOtherFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected