This package provides common methods applicable for files
and directories. pack-dir
works only on Linux with 7z installed.
This package provides common methods applicable for files and directories. `pack-dir` works only on Linux with 7z installed.
(copy-dir from to)
Target path including parent directories will be auto created.
Target path including parent directories will be auto created.
(create-dir dir)
Create directory with all parents if needed, input could be the directory path as a string, or a file object. May throw IOException when write failed.
Create directory with all parents if needed, input could be the directory path as a string, or a file object. May throw IOException when write failed.
(del-dir dir)
Delete directory, will fail silently when dir
does not
exist, will throw an exception when deletion failed.
Delete directory, will fail silently when `dir` does not exist, will throw an exception when deletion failed.
(get-name uri)
Get the file name from a uri string
Get the file name from a uri string
(gzipped-input-stream->str input-stream & [encoding])
(pack-dir outdir dir & {:keys [password filename]})
Create 7z archive of a directory, using command like
7z a -mhe=on -pmy_password archive.7z a_directory
(pack-dir "/tmp/pk" "./" :password "abc" :filename "abc")
Create 7z archive of a directory, using command like `7z a -mhe=on -pmy_password archive.7z a_directory` `(pack-dir "/tmp/pk" "./" :password "abc" :filename "abc")`
(read-props cfg & [create? default-conf])
Reads edn encoded cfg
file. If this file does not exist, create it
by loading default-conf
if create?
is true.
Reads edn encoded `cfg` file. If this file does not exist, create it by loading `default-conf` if `create?` is true.
(str->gzipped-bytes str)
Convert string to gzipped bytes
Convert string to gzipped bytes
(str->gzipped-file str out)
Convert intput string to gzipped file. The caller needs to manually delete the output file in case of exception.
Convert intput string to gzipped file. The caller needs to manually delete the output file in case of exception.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close