How to check if a record is a file or folder using the zip file of the Python standard library?

I have a zip file and I need to check if the file is a folder or file without extracting them. I could check it using the file_size property of infolist if it is 0, but this is the same for a file with size 0. So this is not useful.

I looked at the ZIP spec , but that didn't help either.

How to check if a record is a file or folder using the zip file of the Python standard library?

+4
source share
1 answer

How to check if a file name ends with / ?

+8
source

All Articles