Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
# 字节单位转换
551
def
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
ClearSystem
Function · 0.70
ClearMail
Function · 0.70
ClearSession
Function · 0.70
ClearOther
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected