Skip to main content

General

92
  • absolute?

    Returns true if `f` represents an absolute path via [Path#isAbsolute](https://docs.oracle.com/en/java/javase/11/docs/api...

  • absolutize

    Converts `f` into an absolute `Path` via [Path#toAbsolutePath](https://docs.oracle.com/en/java/javase/11/docs/api/java.b...

  • canonicalize

    Returns the canonical `Path` for `f` via [File#getCanonicalPath](https://docs.oracle.com/en/java/javase/11/docs/api/java...

  • components

    Returns a seq of all components of `f` as paths. i.e.: split on the [[file-separator]].

  • copy

    Copies `src` file to `dest` dir or file using [Files/copy](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/...

  • copy-tree

    Copies entire file tree from `src` to `dest`. Creates `dest` if needed using [[create-dirs]], passing it the `:posix-f...

  • create-dir

    Creates dir using [Files/createDirectory](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Fil...

  • create-dirs

    Creates directories for `path` using [Files/createDirectories](https://docs.oracle.com/en/java/javase/11/docs/api/java.b...

  • create-file

    Creates empty file at `path` using [Files/createFile](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/...

  • create-link

    Create a new `link` (directory entry) for an `existing` file via [Files/createLink](https://docs.oracle.com/en/java/java...

  • create-sym-link

    Create a symbolic `link` to `target` via [Files/createSymbolicLink](https://docs.oracle.com/en/java/javase/11/docs/api/j...

  • create-temp-dir

    Creates a directory using [Files/createTempDirectory](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/...

  • create-temp-file

    Creates an empty file using [Files/createTempFile](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio...

  • creation-time

    Returns creation time of `f` as [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/at...

  • cwd

    Returns current working directory as `Path`

  • delete

    Deletes `f` using [Files/delete](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Files.html#d...

  • delete-if-exists

    Deletes `f` if it exists via [Files/deleteIfExists](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/ni...

  • delete-on-exit

    Requests delete of file `f` on exit via [File#deleteOnExit](https://docs.oracle.com/en/java/javase/11/docs/api/java.base...

  • delete-tree

    Deletes a file tree `root` using [[walk-file-tree]]. Similar to `rm -rf`. Does not follow symlinks. `force` ensures r...

  • directory?

    Returns true if `f` is a directory, using [Files/isDirectory](https://docs.oracle.com/en/java/javase/11/docs/api/java.ba...

  • ends-with?

    Returns `true` if path `this` ends with path `other` via [Path#endsWith](https://docs.oracle.com/en/java/javase/11/docs/...

  • exec-paths

    Returns executable paths (using the `PATH` environment variable). Same as `(split-paths (System/getenv "PATH"))`.

  • executable?

    Returns true if `f` has is executable via [Files/isExecutable](https://docs.oracle.com/en/java/javase/11/docs/api/java.b...

  • exists?

    Returns true if `f` exists via [Files/exists](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file...

  • expand-home

    If `f` begins with a tilde (`~`), expand the tilde to the value of the `user.home` system property. If the `f` begins ...

  • extension

    Returns the extension of `path` via [[split-ext]].

  • file

    Coerces arg(s) into a `File`, combining multiple paths into one. Multiple-arg versions treat the first argument as par...

  • file-name

    Returns the name of the file or directory via [File#getName](https://docs.oracle.com/en/java/javase/11/docs/api/java.bas...

  • file-separator

    The system-dependent default name-separator character (as string)

  • file-time->instant

    Converts `ft` [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/FileTime.h...

  • file-time->millis

    Converts `ft` [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/attribute/FileTime.h...

  • get-attribute

    Return `attribute` for `path` via [Files/getAttribute](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java...

  • glob

    Returns a vector of paths matching glob `pattern` (on path and filename) relative to `root` dir. Patterns containing `...

  • gunzip

    Extracts `gz-file` to `dest` dir. If `dest` dir not specified (or `nil`) defaults to `gz-file` dir. File is extr...

  • gzip

    Gzips `source-file` to `dir/out-file`. Does not store the `source-file` name in the `.gz` file. The `source-file` i...

  • hidden?

    Returns true if `f` is hidden via [Files/isHidden](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio...

  • home

    With no arguments, returns the current value of the `user.home` system property as a `Path`. If a `user` is passed, re...

  • instant->file-time

    Converts `instant` [Instant](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html) to a...

  • last-modified-time

    Returns last modified time of `f` as a [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/...

  • list-dir

    Returns all paths in `dir` as vector. For descending into subdirectories use `glob.` - `glob-or-accept` - a glob st...

  • list-dirs

    Similar to list-dir but accepts multiple roots in `dirs` and returns the concatenated results. - `glob-or-accept` - a ...

  • match

    Returns a vector of paths matching `pattern` (on path and filename) relative to `root` dir. Pattern interpretation is ...

  • millis->file-time

    Converts epoch millis (long) to a [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/...

  • modified-since

    Returns seq of regular files (non-directories, non-symlinks) from `file-set` that were modified since the `anchor` path....

  • move

    Move or rename dir or file `source` to `target` dir or file via [Files/move](https://docs.oracle.com/en/java/javase/11/d...

  • normalize

    Returns normalize `Path` for `f` via [Path#normalize](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/...

  • owner

    Returns the owner of file `f` via [Files/getOwner](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio...

  • parent

    Returns parent of `f`. Akin to `dirname` in bash.

  • path

    Coerces arg(s) into a `Path`, combining multiple paths into one. Multiple-arg versions treat the first argument as par...

  • path-separator

    The system-dependent path-separator character (as string).

  • posix->str

    Converts a set of `PosixFilePermission` `p` to a string.

  • posix-file-permissions

    Returns posix file permissions for `f`. Use [[posix->str]] to view as a string. Options: * [`:nofollow-links`](/REA...

  • read-all-bytes

    Returns contents of file `f` as byte array via [Files/readAllBytes](https://docs.oracle.com/en/java/javase/11/docs/api/j...

  • read-all-lines

    Read all lines from a file `f` via [Files/readAllLines](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/jav...

  • read-attributes

    Same as [[read-attributes*]] but turns `attributes` for `path` into a map and keywordizes keys. Keywordizing can be ch...

  • read-attributes*

    Reads `attributes` for `path` via [Files/readAttributes](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/ja...

  • read-link

    Reads the target of a symbolic link `path` via [Files/readSymbolicLink](https://docs.oracle.com/en/java/javase/11/docs/a...

  • readable?

    Returns true if `f` is readable via [Files/isReadable](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java...

  • real-path

    Converts `f` into real `Path` via [Path#toRealPath](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/ni...

  • regular-file?

    Returns true if `f` is a regular file, using [Files/isRegularFile](https://docs.oracle.com/en/java/javase/11/docs/api/ja...

  • relative?

    Returns true if `f` represents a relative path (in other words, is not [[absolute?]]).

  • relativize

    Returns relative `Path` by comparing `this` with `other` via [Path#relativize](https://docs.oracle.com/en/java/javase/11...

  • root

    Returns `root` for `path` as `Path`, or `nil` via [Path#getRoot](https://docs.oracle.com/en/java/javase/11/docs/api/java...

  • same-file?

    Returns `true` if `this` is the same file as `other` via [Files/isSamefile](https://docs.oracle.com/en/java/javase/11/do...

  • set-attribute

    Set `attribute` for `path` to `value` via [Files/setAttribute](https://docs.oracle.com/en/java/javase/11/docs/api/java.b...

  • set-creation-time

    Sets creation time of `f` to time (`epoch millis` or [FileTime](https://docs.oracle.com/en/java/javase/11/docs/api/java....

  • set-last-modified-time

    Sets last modified time of `f` to `time` (`epoch millis` or [FileTime](https://docs.oracle.com/en/java/javase/11/docs/ap...

  • set-posix-file-permissions

    Sets `posix-file-permissions` on `f`. Accepts a string like `"rwx------"` or a set of `PosixFilePermission`.

  • size

    Returns the size of a file (in bytes).

  • split-ext

    Splits `path` on extension. If provided, a specific extension `ext`, the extension (without dot), will be used for spl...

  • split-paths

    Splits a `joined-paths` list given as a string joined by the OS-specific [[path-separator]] into a vec of paths. On UN...

  • starts-with?

    Returns `true` if path `this` starts with path `other` via [Path#startsWith](https://docs.oracle.com/en/java/javase/11/d...

  • str->posix

    Converts a string `s` to a set of `PosixFilePermission`. `s` is a string like `"rwx------"`.

  • strip-ext

    Strips extension for `path` via [[split-ext]].

  • sym-link?

    Determines if `f` is a symbolic link via [Files/isSymbolicLink](https://docs.oracle.com/en/java/javase/11/docs/api/java....

  • temp-dir

    Returns `java.io.tmpdir` property as path.

  • unixify

    Returns path as string with Unix-style file separators (`/`).

  • unzip

    Unzips `zip-file` to `dest` directory (default `"."`). Options: * `:replace-existing` - `true` / `false`: overwri...

  • update-file

    Updates the contents of text file `path` using `f` applied to old contents and `xs`. Returns the new contents. Opti...

  • walk-file-tree

    Walks `f` using [Files/walkFileTree](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Files.ht...

  • which

    Returns `Path` to first executable `program` found in `:paths` `opt`, similar to the `which` Unix command. Default for...

  • which-all

    Returns every `Path` to `program` found in ([[exec-paths]]). See [[which]].

  • windows?

    Returns true if OS is Windows.

  • with-temp-dir

    Evaluates body with binding-name bound to the result of `(create-temp-dir options)`. See [[create-temp-dir]] for valid...

  • writable?

    Returns true if `f` is writable via [Files/isWritable](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java...

  • write-bytes

    Writes `bytes` to `path` via [Files/write](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/nio/file/Fi...

  • write-lines

    Writes `lines`, a seqable of strings to `path` via [Files/write](https://docs.oracle.com/en/java/javase/11/docs/api/java...

  • xdg-cache-home

    Path representing the base directory relative to which user-specific non-essential data files should be stored as descri...

  • xdg-config-home

    Path representing the base directory relative to which user-specific configuration files should be stored as described i...

  • xdg-data-home

    Path representing the base directory relative to which user-specific data files should be stored as described in the [XD...

  • xdg-state-home

    Path representing the base directory relative to which user-specific state files should be stored as described in the [X...

  • zip

    Zips entry or `entries` into `zip-file`. An entry may be a file or directory. Directories are included recursively and...