Liking cljdoc? Tell your friends :D

lambdaisland.shellutils

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
raw docstring

*cwd*clj

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.
sourceraw docstring

absolute?clj

(absolute? f)

The File contains an absolute path

The File contains an absolute path
sourceraw docstring

basenameclj

(basename path)

Get the name of the file without any directory components

Get the name of the file without any directory components
sourceraw docstring

canonicalizeclj

(canonicalize path)

Return a canonical path

Resolves symlinks and makes relative paths absolute

Return a canonical path

Resolves symlinks and makes relative paths absolute
sourceraw docstring

dirnameclj

source

extensionclj

(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).
sourceraw docstring

fileclj

(file path)

java.io.File constructor

Resolves relative paths relative to *cwd*

java.io.File constructor

Resolves relative paths relative to [[*cwd*]]
sourceraw docstring

filter-filesclj

(filter-files files re)

Filter list of files for names matching pattern re

Filter list of files for names matching pattern re
sourceraw docstring

globclj

(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.
sourceraw docstring

Joinablecljprotocol

joinclj

(join this that)

Join Strings, Paths, and Files into a single Path.

Join Strings, Paths, and Files into a single Path.
source

lsclj

(ls dir)

List directory contents

List directory contents
sourceraw docstring

mkdir-pclj

(mkdir-p dir)

Make directory including parents

Make directory including parents
sourceraw docstring

parent-fileclj

(parent-file dir)
source

relative?clj

(relative? f)

The File contains a relative path

The File contains a relative path
sourceraw docstring

relativizeclj

(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
sourceraw docstring

strip-extclj

(strip-ext file)

Remove the extension from the file

Remove the extension from the file
sourceraw docstring

with-cwdcljmacro

(with-cwd cwd & body)

Execute body with *cwd* set to cwd.

Execute `body` with [[*cwd*]] set to `cwd`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close