Liking cljdoc? Tell your friends :D

com.eldrix.trud.impl.zip


delete-filesclj

(delete-files dir)

Delete all files from the dir specified, where dir can be anything coercible to a file using [[clojure.java.io/as-file]].

Delete all files from the `dir` specified, where `dir` can be anything
coercible to a `file` using [[clojure.java.io/as-file]].
sourceraw docstring

delete-pathsclj

(delete-paths paths)

Delete all paths specified, including nested structures. Parameters:

  • paths : a sequence of objects java.nio.file.Path.
Delete all paths specified, including nested structures.
Parameters:
- paths : a sequence of objects `java.nio.file.Path`.
sourceraw docstring

is-zip-file?clj

(is-zip-file? s)
source

unzipclj

(unzip in)
(unzip in out)

Unzip a zip archive to the directory specified. Parameters:

  • in : path of zip file
  • out : path of the directory to which files will be extracted.

If no out path is specified, a temporary directory will be created. The out directory will be created if it doesn't exist.

Unzip a zip archive to the directory specified.
Parameters:
- in  : path of zip file
- out : path of the directory to which files will be extracted.

If no `out` path is specified, a temporary directory will be created.
The out directory will be created if it doesn't exist.
sourceraw docstring

unzip-in-placeclj

(unzip-in-place paths)

Unzip each path at the same location, creating a directory based on the name of the zip file, replacing any '.' in the filename with '_'. This doesn't check that this won't clobber an existing file.

Parameters:

  • paths: a sequence of objects of type java.nio.file.Path.
Unzip each path at the same location, creating a directory based on the name
of the zip file, replacing any '.' in the filename with '_'. This doesn't
check that this won't clobber an existing file.

Parameters:
- paths: a sequence of objects of type `java.nio.file.Path`.
sourceraw docstring

unzip-nestedclj

(unzip-nested in)
(unzip-nested in out)

Unzip a zip archive to the directory specified, unzipping nested zip files. Parameters:

  • in : path of zip file
  • out : path of the directory to which files will be extracted.

If no out path is specified, a temporary directory will be created. The out directory will be created if it doesn't exist.

Unzip a zip archive to the directory specified, unzipping nested zip files.
Parameters:
- in  : path of zip file
- out : path of the directory to which files will be extracted.

If no `out` path is specified, a temporary directory will be created.
The out directory will be created if it doesn't exist.
sourceraw docstring

unzip-queryclj

(unzip-query q)
(unzip-query p q)

Resolves a query representing files from a nested directory structure, including extracting nested zip files.

A query is a potentially nested vector of strings or paths. ["test.zip" ["nested1.zip"] ["nested2.zip" "file.txt"]]

This will extract the test.zip file, extract the files in both nested1.zip and nested2.zip and also returns a path for file.txt from the nested2.zip.

Results will be java.nio.file.Path objects in the same shape as the query. For the example above, four paths will be returned.

Resolves a query representing files from a nested directory structure,
including extracting nested zip files.

A query is a potentially nested vector of strings or paths.
["test.zip"
 ["nested1.zip"]
 ["nested2.zip" "file.txt"]]

This will extract the test.zip file, extract the files in both nested1.zip
and nested2.zip and also returns a path for `file.txt` from the nested2.zip.

Results will be java.nio.file.Path objects in the same shape as the query.
For the example above, four paths will be returned.
sourceraw docstring

zipclj

(zip f)
(zip zip-file f)

Zip a file or directory, either to a temporary file, or the named file. Returns java.io.File for the created zip file.

Zip a file or directory, either to a temporary file, or the named file.
Returns `java.io.File` for the created zip file.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close