I am trying to use scandir in my python code. It works well in Python 3.5+, but in Python 3.4 it is not available, till you install with pip. But on my machine I cannot install or upgrade any software
Is there any alternative?
totalsize = e.stat().st_size
Folderpath = '/home/miguel/'
totalsize = 0
for ele in os.scandir(Folderpath):
totalsize += os.stat(ele).st_size