README
This commit is contained in:
parent
d0e7ad3fa1
commit
29ac221c20
1 changed files with 4 additions and 2 deletions
|
|
@ -1113,11 +1113,13 @@ Your command line args: (1 2 3)
|
||||||
### Extract single file from zip
|
### Extract single file from zip
|
||||||
|
|
||||||
``` clojure
|
``` clojure
|
||||||
;; given the following zip file created as follows:
|
;; Given the following:
|
||||||
|
|
||||||
;; $ echo 'contents' > file
|
;; $ echo 'contents' > file
|
||||||
;; $ zip zipfile.zip file
|
;; $ zip zipfile.zip file
|
||||||
;; $ rm file
|
;; $ rm file
|
||||||
;; we extract the single file from the zip using java.nio:
|
|
||||||
|
;; we extract the single file from the zip archive using java.nio:
|
||||||
|
|
||||||
(import '[java.nio.file Files FileSystems CopyOption])
|
(import '[java.nio.file Files FileSystems CopyOption])
|
||||||
(let [zip-file (io/file "zipfile.zip")
|
(let [zip-file (io/file "zipfile.zip")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue