Author Topic: return a list of the extract files from the exctract method  (Read 3571 times)

asafdav2

  • Newbie
  • *
  • Posts: 2
    • View Profile
return a list of the extract files from the exctract method
« on: January 20, 2012, 02:55:29 PM »
i just discovered this library and so far it's great. i do however have one feature request -
currently the extract methods return void. i'd like to be able to receive a list of the extracted files
thanks

admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 403
    • View Profile
Re: return a list of the extract files from the exctract method
« Reply #1 on: January 30, 2012, 05:18:54 PM »
Hi,

ZipFile.extractAll() extracts all files in the zip file, So you can get a list of all files in the zip file by ZipFile.getFileHeaders(). This will return a List of FileHeaders in the zip file and from these FileHeaders you can get the file name by FileHeader.getFileName(). Please have a look at ListAllFilesInZipFile.java in the examples pacakage (available on the downloads page).

Regards,
Srikanth

Awawintarod

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: return a list of the extract files from the exctract method
« Reply #2 on: November 27, 2014, 01:31:28 PM »
Come back many times To read that I feel great.

 


Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 346

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 347

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 348

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 351

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 352

Warning: Cannot modify header information - headers already sent in /home/content/66/5374066/html/zip4j/forum/Sources/Errors.php on line 353
Connection Problems

Connection Problems

Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.