Using the zip-conduit library, I want to list entries in a ZIP archive. I want to print them only filename per line - similar to unzip -l, but without any additional information.
Note: This question was answered using Q&A-style and therefore intentionally doesn't show any research effort!
You can use the
entryNamesfunction. By modifying the ZIP extraction example we can print the names instead of extracting.The following example program takes the ZIP file name from the first commandline parameter and uses
mapM_ putStrLnto print them: