File system manipulation functions.
File system manipulation functions.
(chmod path-like mode)Change file mode, given octal mode specification as string.
Change file mode, given octal mode specification as string.
(copy-file! source-path target-path)(cwd)Rturn the current working directory as a Path.
Rturn the current working directory as a Path.
(delete-file! path-like)Delete the file at the specified path-like. Semantics as for java.nio.file.Files/delete.
Delete the file at the specified path-like. Semantics as for java.nio.file.Files/delete.
(delete-on-exit-if-exists! path-like)(delete-recursively! path-like)(file-exists? path-like)Predicate for the given path existing.
Predicate for the given path existing.
(file? path-like)Predicate for path referring to a file.
Predicate for path referring to a file.
(list-paths path-like)Return a lazy sequence of paths under path in depth first order.
Return a lazy sequence of paths under path in depth first order.
(make-temp-dir prefix-or-options)Return a newly created temporary directory. Prefix is an arbitary string that is used to name the directory. Options is a map with the keys: :delete-on-exit - delete the dir on JVM exit (default true). :dir - directory to create the dir in (default is the system temp dir). Must be of type that can be passed to clojure.java.io/dir. :prefix - a string that is used to name the directory.
Return a newly created temporary directory.
Prefix is an arbitary string that is used to name the directory.
Options is a map with the keys:
:delete-on-exit - delete the dir on JVM exit (default true).
:dir - directory to create the dir in (default is the system temp dir).
Must be of type that can be passed to clojure.java.io/dir.
:prefix - a string that is used to name the directory.(make-temp-path options-or-prefix)Return a temporary file path.
The options map can pass the keys:
:delete-on-exit - delete the file on JVM exit (default false) :dir - the directory in which to create the file (defaults to the system temp dir). Must be a path-like. :prefix - prefix for the file name (default "tmp"). Must be at elast three characters long. :suffix - suffix for the file name (default ".tmp")
As a shortcut, a prefix string can be passed instead of the options mao.
Return a temporary file path.
The options map can pass the keys:
:delete-on-exit - delete the file on JVM exit (default false)
:dir - the directory in which to create the file (defaults to the system temp dir).
Must be a path-like.
:prefix - prefix for the file name (default "tmp").
Must be at elast three characters long.
:suffix - suffix for the file name (default ".tmp")
As a shortcut, a prefix string can be passed instead of the options mao.(mkdirs path-like)Ensure the given path exists.
Ensure the given path exists.
(real-path path-like)(with-temp-dir bindings & body)bindings => [name prefix-or-options ...]
Evaluate body with names bound to java.io.File objects of newly created temporary directories, and a finally clause that deletes them recursively in reverse order.
Prefix is a string that is used to name the directory. Options is a map with the keys: :delete-on-exit - delete the dir on JVM exit (default true) :dir - directory to create the dir in (default is the system temp dir). Must be of type that can be passed to clojure.java.io/dir. :prefix - a string that is used to name the directory.
bindings => [name prefix-or-options ...]
Evaluate body with names bound to java.io.File
objects of newly created temporary directories, and a finally clause
that deletes them recursively in reverse order.
Prefix is a string that is used to name the directory.
Options is a map with the keys:
:delete-on-exit - delete the dir on JVM exit (default true)
:dir - directory to create the dir in (default is the system temp dir).
Must be of type that can be passed to clojure.java.io/dir.
:prefix - a string that is used to name the directory.(with-temp-path [sym prefix-or-options & more :as bindings] & body)A scope with sym bound to a java.io.File object for a temporary file in the system's temporary directory.
Options is a map with the keys:
:delete - delete file when leaving scope (default true) :delete-on-exit - delete the file on JVM exit (default false) :dir - directory to create the file in (default is the system temp dir). Must be of type that can be passed to clojure.java.io/file. :prefix - prefix for the file name (default "tmp") Must be at elast three characters long. :suffix - suffix for the file name (default ".tmp")
A scope with sym bound to a java.io.File object for a temporary
file in the system's temporary directory.
Options is a map with the keys:
:delete - delete file when leaving scope (default true)
:delete-on-exit - delete the file on JVM exit (default false)
:dir - directory to create the file in (default is the system temp dir).
Must be of type that can be passed to clojure.java.io/file.
:prefix - prefix for the file name (default "tmp")
Must be at elast three characters long.
:suffix - suffix for the file name (default ".tmp")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 |