(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]].
(delete-paths paths)
Delete all paths specified, including nested structures. Parameters:
java.nio.file.Path
.Delete all paths specified, including nested structures. Parameters: - paths : a sequence of objects `java.nio.file.Path`.
(unzip in)
(unzip in out)
Unzip a zip archive to the directory specified. Parameters:
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.
(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:
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`.
(unzip-nested in)
(unzip-nested in out)
Unzip a zip archive to the directory specified, unzipping nested zip files. Parameters:
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.
(unzip2 q)
(unzip2 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 below, 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 below, four paths will be returned.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close