Globbing and other shell-like filename handling
Extracted from https://github.com/lambdaisland/open-source and further improved
Globbing and other shell-like filename handling Extracted from https://github.com/lambdaisland/open-source and further improved
Current working directory
Relative paths are resolved starting from this location. Defaults to the CWD of the JVM, as exposed through the 'user.dir' property.
Current working directory Relative paths are resolved starting from this location. Defaults to the CWD of the JVM, as exposed through the 'user.dir' property.
(absolute? f)
The File contains an absolute path
The File contains an absolute path
(basename path)
Get the name of the file without any directory components
Get the name of the file without any directory components
(canonicalize path)
Return a canonical path
Resolves symlinks and makes relative paths absolute
Return a canonical path Resolves symlinks and makes relative paths absolute
(extension file)
Get the extension of the file without the dot
This function does not have special handling for files that start with a dot (hidden files on Unix-family systems).
Get the extension of the file without the dot This function does not have special handling for files that start with a dot (hidden files on Unix-family systems).
(file path)
java.io.File constructor
Resolves relative paths relative to *cwd*
java.io.File constructor Resolves relative paths relative to [[*cwd*]]
(filter-files files re)
Filter list of files for names matching pattern re
Filter list of files for names matching pattern re
(glob pattern)
Returns a seq of java.io.File instances that match the given glob pattern. Ignores dot files unless explicitly included.
Examples: (glob ".{jpg,gif}") (glob ".") (glob "/usr//se")
Based on https://github.com/jkk/clj-glob/blob/b1df67efb003f0e372c914346209d41c6df78e20/src/org/satta/glob.clj
but with some improvements.
Returns a seq of java.io.File instances that match the given glob pattern. Ignores dot files unless explicitly included. Examples: (glob "*.{jpg,gif}") (glob ".*") (glob "/usr/*/se*") Based on https://github.com/jkk/clj-glob/blob/b1df67efb003f0e372c914346209d41c6df78e20/src/org/satta/glob.clj but with some improvements.
(join this that)
Join Strings, Paths, and Files into a single Path.
Join Strings, Paths, and Files into a single Path.
(mkdir-p dir)
Make directory including parents
Make directory including parents
(relative? f)
The File contains a relative path
The File contains a relative path
(relativize base path)
Turn an absolute path and a base path into a relative path
Turn an absolute path and a base path into a relative path
(strip-ext file)
Remove the extension from the file
Remove the extension from the file
(with-cwd cwd & body)
Execute body
with *cwd*
set to cwd
.
Execute `body` with [[*cwd*]] set to `cwd`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close