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