I have a zip file and I need to check if a file is a folder or a file without extracting them. I could check it using file_size
property of infolist
if it is 0 but this is the same for a file with 0 size. So it is not useful.
I looked on the ZIP specification but that didn't helped much either.
How to check if entry is file or folder using Python's standard library zipfile?
How about checking if the filename ends with /
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With