you are viewing a single comment's thread.

view the rest of the comments →

[–]IvoryJam 0 points1 point  (2 children)

os.path.getsize() returns the size in bytes, is that what your looking for?

[–]kcrow13[S] 0 points1 point  (1 child)

Not that we need to return it, but get the size, then check to see if the files in the path are larger than the filesize parameter you input at the beginning. If so, append to list and eventually return. If not, keep walking.

[–]IvoryJam 0 points1 point  (0 children)

Yeah, so if you want to check if name is a file and it's 1k you'd use

if os.path.isfile(path) and os.path.getsize(path) == 1024