Liking cljdoc? Tell your friends :D

koine.fs

Filesystem, portable.

Note file-seq is a trap: it resolves on BOTH hosts but takes different argument types — a java.io.File on the JVM, a string path on cljgo. A name that resolves everywhere is not thereby portable, which is why directory traversal lives behind this seam.

Filesystem, portable.

Note `file-seq` is a trap: it resolves on BOTH hosts but takes different
argument types — a java.io.File on the JVM, a string path on cljgo. A name
that resolves everywhere is not thereby portable, which is why directory
traversal lives behind this seam.
raw docstring

directory?clj/s

(directory? path)

exists?clj/s

(exists? path)

find-filesclj/s

(find-files root suffix)

Every file under root whose path ends with suffix, SORTED.

Sorted because skill discovery must be deterministic across hosts — the underlying traversal order is not guaranteed to match.

Every file under `root` whose path ends with `suffix`, SORTED.

Sorted because skill discovery must be deterministic across hosts — the
underlying traversal order is not guaranteed to match.
raw docstring

list-treeclj/s

(list-tree root)

Every path under root, recursively, as strings — files and directories. Order is unspecified per host; callers that need determinism must sort.

Every path under `root`, recursively, as strings — files and directories.
Order is unspecified per host; callers that need determinism must sort.
raw docstring

read-bytesclj/s

(read-bytes path)

The whole file at path as a byte array. Use this, never read-file, for anything that is not text — the text route is lossy for non-UTF-8 bytes.

The whole file at `path` as a byte array. Use this, never `read-file`, for
anything that is not text — the text route is lossy for non-UTF-8 bytes.
raw docstring

read-fileclj/s

(read-file path)

write-bytesclj/s

(write-bytes path bs)

Write byte array bs to path, replacing any existing file. Returns nil.

Write byte array `bs` to `path`, replacing any existing file. Returns nil.
raw docstring

write-fileclj/s

(write-file path s)

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