Node.js filesystem utilities for snap! source editing.
Node.js filesystem utilities for snap! source editing.
(ensure-parent-dir! file-path)Ensure the parent directory of the given path exists, creating it if needed.
Ensure the parent directory of the given path exists, creating it if needed.
(file-exists? file-path)Returns true if the file at path exists.
Returns true if the file at path exists.
(list-edn-files dir)Return a sequence of .edn filenames in dir, or nil if dir doesn't exist.
Return a sequence of .edn filenames in dir, or nil if dir doesn't exist.
(node-env?)Returns true when running in a Node.js environment.
Returns true when running in a Node.js environment.
(read-file file-path)Read a file as a UTF-8 string.
Read a file as a UTF-8 string.
(resolve-file-path filename)Resolve a source filename to an absolute path.
Searches src/, test/, dev/, and the current working directory. Handles .class → .clj/.cljc extension substitution for compiled forms. Returns the absolute path string, or nil if not found.
Resolve a source filename to an absolute path. Searches src/, test/, dev/, and the current working directory. Handles .class → .clj/.cljc extension substitution for compiled forms. Returns the absolute path string, or nil if not found.
(write-file file-path content)Write a string to a file.
Write a string to a file.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |