def size_of_dir(dirname):
print("Size of directory: ")
print(os.path.getsize(dirname))
is the code in question. dirname is a directory with 130 files of about 1kb each. When I call this function, it returns 4624, which is NOT the size of the directory...why is this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…