on-internet
← Community

Android unzip open failed: ENOENT (No such file or directory)

Stack Overflow ·

I am using the following code to unzip a set of files (containing folders as well): private boolean unpackZip(String path, String zipname) { InputStream is; ZipInputStream zis; try { String filename; is = new FileInputStream(path + zipname); zis = new ZipInputStream(new BufferedInputStream(is)); ZipEntry ze; byte[] buffer = new byte[1024]; int count; while ((ze = zis.getNextEntry()) != null) { // zapis do souboru filename = ze.getName(); // Need to create directories if not exists, or // it will generate an Exception... if (ze.isDirectory()) { File fmd = new File(path + filename); fmd.mkdirs()

Comments

Sign in or sign up to comment and upvote.

No comments yet.