0

Is it possible to create IOFileFilter that searches also in *.zip files?

I am looking for all files with *.fot extensions, which part are inside archives.

Maybe is there another simple solution? But I have already written working program and do not want to mess things too much.

1 Answer 1

1

It doesn't seem to be possible, because the IOFileFilter handles the zip-File as what it is - a file. What you could do, is checking the Zip-File by yourself by using ZipFileEntry

// open a zip file for reading
ZipFile zipFile = new ZipFile("pathToFile.fot");

Enumeration<ZipEntry> entries = zipFile.entries();

while (entries.hasMoreElements()) {
    ZipEntry entry = entries.nextElement();

    // get the name of the entry
    String entryName = entry.getName();

    //here do filechecking

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.