|
|
|
@ -137,6 +137,7 @@ class Folders(SmartTop):
|
|
|
|
|
paths = [args['path']]
|
|
|
|
|
else:
|
|
|
|
|
paths = args['path']
|
|
|
|
|
paths = paths
|
|
|
|
|
_out = pd.DataFrame()
|
|
|
|
|
for path in paths :
|
|
|
|
|
if os.path.exists(path) :
|
|
|
|
@ -145,8 +146,10 @@ class Folders(SmartTop):
|
|
|
|
|
#
|
|
|
|
|
rows = self._get(path)
|
|
|
|
|
if len(rows) > 0 :
|
|
|
|
|
print rows
|
|
|
|
|
r = pd.DataFrame(rows)
|
|
|
|
|
r = pd.DataFrame([{"name":path,"files":r.shape[0],"age_in_days":r.age.mean(),"size_in_kb":r.size.sum()}])
|
|
|
|
|
_out = _out.append(r)
|
|
|
|
|
r = pd.DataFrame([{"name":path,"files":r.shape[0],"age_in_days":r.age.mean(),"size_in_kb":r['size'].sum()}])
|
|
|
|
|
_out = _out.append(r,sort=False)
|
|
|
|
|
#
|
|
|
|
|
# @TODO: The state of the hard-drive would be a good plus
|
|
|
|
|
|
|
|
|
|
return _out
|
|
|
|
|