max folder size
This commit is contained in:
9
util.py
9
util.py
@@ -10,6 +10,15 @@ def curr_directory():
|
||||
return os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
def folder_size(path):
|
||||
size = 0
|
||||
for f in os.listdir(path):
|
||||
f = unicode(f)
|
||||
if os.path.isfile(os.path.join(path, f)):
|
||||
size += os.path.getsize(os.path.join(path, f))
|
||||
return size
|
||||
|
||||
|
||||
class Singleton(object):
|
||||
|
||||
def __new__(cls, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user