mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
GetDirectorySize
This commit is contained in:
parent
f6e248c29f
commit
e34bfa9591
@ -252,6 +252,15 @@ def GetDirectoryContents(dir, filters="*", skip=[]):
|
||||
results.sort()
|
||||
return results
|
||||
|
||||
def GetDirectorySize(dir):
|
||||
size = 0
|
||||
for (path, dirs, files) in os.walk(dir):
|
||||
for file in files:
|
||||
try:
|
||||
size += os.path.getsize(os.path.join(path, file))
|
||||
except: pass
|
||||
return size
|
||||
|
||||
########################################################################
|
||||
##
|
||||
## LocateBinary
|
||||
|
Loading…
x
Reference in New Issue
Block a user