This commit is contained in:
Usman Nasir
2022-05-22 13:01:04 +05:00
parent 2fe157494c
commit 9ff9f8ec2d
2 changed files with 18 additions and 0 deletions

View File

@@ -1195,6 +1195,14 @@ class virtualHostUtilities:
except:
return [int(0), int(0)]
@staticmethod
def getDiskUsageofPath(path):
try:
return subprocess.check_output('du -hs %s --block-size=1M' % (path), shell=True).decode("utf-8").split()[0]
except BaseException:
return '0MB'
@staticmethod
def permissionControl(path):
try: