zipfile module and directories and symlinks

J

Jim

I'm using the zipfile module to unpack bundles. Is there a Right way
to recognize directories, or do I just check if the name ends in '/'
(i.e., os.sep)? That is, I have this.

for bundleInfo in bundleObject.infolist():
...stuff...
if bundleInfo.filename[-1:]==os.sep:
make a dir
else
make a file

Is that right? What about symlinks? How do I know one of those?

Thanks for any help,
Jim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,235
Messages
2,571,181
Members
47,818
Latest member
KazukoXea6

Latest Threads

Top