tags:

views:

91

answers:

2

I would like to ignore hidden files when extracting a zip. Is there any way i can identify that a ZipEntry belongs to a 'hidden' file?

+2  A: 

http://java.sun.com/j2se/1.5.0/docs/api/java/io/File.html#isHidden%28%29

It should have been preserved when they created the zip.

glowcoder
@downvoter care to explain why?
glowcoder
+1  A: 

If this is on Windows, there is no way to do it. The ZipEntry doesn't contain such information. You might be able to write your own zipper to store the information in ExtraInfo field.

On Unix, you can workaround by checking the leading dot in the filename.

ZZ Coder