Liking cljdoc? Tell your friends :D

sturdy.fs


chmod-400!clj

(chmod-400! path)

On POSIX file systems set r--------.

On POSIX file systems set r--------.
sourceraw docstring

chmod-600!clj

(chmod-600! path)

On POSIX file systems set rw-------.

On POSIX file systems set rw-------.
sourceraw docstring

ensure-parent!clj

(ensure-parent! path)

Create parent directories for path if needed.

Create parent directories for `path` if needed.
sourceraw docstring

read-linesclj

(read-lines p)
(read-lines p charset)

Read file as a vector of lines. Charset defaults to UTF-8.

Read file as a vector of lines. Charset defaults to UTF-8.
sourceraw docstring

slurp-bytesclj

(slurp-bytes p)

Read entire file as byte[]. Throws if the file does not exist.

Read entire file as byte[]. Throws if the file does not exist.
sourceraw docstring

slurp-ednclj

(slurp-edn p)
(slurp-edn p cs)

Read entire file as EDN. Charset defaults to UTF-8.

Read entire file as EDN. Charset defaults to UTF-8.
sourceraw docstring

slurp-stringclj

(slurp-string p)
(slurp-string p cs)

Read entire file as String. Charset defaults to UTF-8.

Read entire file as String. Charset defaults to UTF-8.
sourceraw docstring

spit-bytes!clj

(spit-bytes! p bytes)
(spit-bytes! p bytes opts)

Write byte[] to file. Creates parent dirs. Options: {:append true | :create true | :truncate-existing true} (defaults match fs/write-bytes).

Write byte[] to file. Creates parent dirs.
Options: {:append true | :create true | :truncate-existing true} (defaults match fs/write-bytes).
sourceraw docstring

spit-edn!clj

(spit-edn! p map_)
(spit-edn! p map_ {:keys [charset atomic?] :or {charset utf8}})

Write EDN to file (prn-str). Creates parent dirs.

Write EDN to file (prn-str). Creates parent dirs.
sourceraw docstring

spit-string!clj

(spit-string! p s)
(spit-string! p s {:keys [charset atomic? append] :or {charset utf8}})

Write String with charset (default UTF-8). Creates parent dirs. {:atomic? true} will write to a temp file and atomically move into place. Note: :append and :atomic? are mutually exclusive; use one or the other.

Write String with charset (default UTF-8). Creates parent dirs.
{:atomic? true} will write to a temp file and atomically move into place.
Note: :append and :atomic? are mutually exclusive; use one or the other.
sourceraw docstring

utf8clj

source

with-extensionclj

(with-extension path ext)

Return a path equivalent to path but with its filename extension replaced by ext.

Return a path equivalent to `path` but with its filename extension replaced by `ext`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close