Liking cljdoc? Tell your friends :D

automaton-build.os.file

Tools to manipulate local files

Is a proxy to babashka.fs tools.

Tools to manipulate local files

Is a proxy to babashka.fs tools.
raw docstring

actual-copyclj

(actual-copy copy-actions)

Do the actual copy of copy-actions.

Do the actual copy of `copy-actions`.
raw docstring

combine-filesclj

(combine-files target-filename & filenames)

Read text content of files filenames and combine them into target-filename.

Read text content of files `filenames` and combine them into `target-filename`.
raw docstring

copy-actionsclj

(copy-actions file-rich-list src-dir dst-dir options)

For all file-rich-list, adds a relative-path and a target-dir-path.

For all `file-rich-list`, adds a `relative-path` and a `target-dir-path`.
raw docstring

copy-dirclj

(copy-dir src-path dst-path options)

copy-fileclj

(copy-file src-path dst-path options)

(create-sym-link path target)

Creates a sym link to target linking to path.

Creates a sym link to `target` linking to `path`.
raw docstring

create-temp-dirclj

(create-temp-dir & sub-dirs)

Returns a subdirectory path string of the system temporary directory. sub-dirs is an optional list of strings, each one is a sub directory.

Returns a subdirectory path string of the system temporary directory.
`sub-dirs` is an optional list of strings, each one is a sub directory.
raw docstring

create-temp-fileclj

(create-temp-file & filename)

Create a temporary file with filename name of the file (optional).

Create a temporary file with `filename` name of the file (optional).
raw docstring

delete-dirclj

(delete-dir dir)

Deletes dir and returns it. If dir does not exist, returns nil

Deletes `dir` and returns it.
If `dir` does not exist, returns nil
raw docstring

delete-fileclj

(delete-file filename)

Deletes filename and returns it. If filename does not exist, returns nil.

Deletes `filename` and returns it.
If `filename` does not exist, returns nil.
raw docstring

delete-pathclj

(delete-path path)

Deletes path and returns it. Returns nil if the path does not exists.

Deletes `path` and returns it.
Returns nil if the `path` does not exists.
raw docstring

empty-dirclj

(empty-dir path)

Empty the directory path.

Empty the directory `path`.
raw docstring

ensure-dir-existsclj

(ensure-dir-exists path)

Creates directory dir if not already existing.

Creates directory `dir` if not already existing.
raw docstring

expand-home-strclj

(expand-home-str str)

In string str, ~ is expanded to the actual value of home directory.

In string `str`, ~ is expanded to the actual value of home directory.
raw docstring

file-rich-listclj

(file-rich-list paths)

Returns, for each element in the paths, return a rich file description with :

  • with path copied here,

  • :exists? key check the existence of the file.

  • and one of:

    • for a directory, :dir? key is true,
    • for a file, :file? key is true.
Returns, for each element in the `paths`, return a rich file description with :

* with `path` copied here,
* `:exists?` key check the existence of the file.

* and one of:
  * for a directory, `:dir?` key is true,
  * for a file, `:file?` key is true.
raw docstring

is-existing-dir?clj

(is-existing-dir? dirname)

Check if this the path exist and is a directory.

Check if this the path exist and is a directory.
raw docstring

is-existing-file?clj

(is-existing-file? filename)

Returns true if filename path already exist and is not a directory.

Returns true if `filename` path already exist and is not a directory.
raw docstring

is-existing-path?clj

(is-existing-path? path)

Returns true if filename path already exist.

Returns true if `filename` path already exist.
raw docstring

make-executableclj

(make-executable filename)

Make file filename executable.

Make file `filename` executable.
raw docstring

matching-filesclj

(matching-files dir file-pattern)

Match files recursively found in dir that are matching file-pattern.

Match files recursively found in `dir` that are matching `file-pattern`.
raw docstring

modified-sinceclj

(modified-since anchor file-set)

Returns true if anchor is older than one of the file in file-set.

Returns `true` if `anchor` is older than one of the file in `file-set`.
raw docstring

pp-fileclj

(pp-file filename file-content)

Pretty print the file.

Pretty print the file.
raw docstring

read-fileclj

(read-file filename)

Read the file named filename.

Returns:

  • filename
  • raw-content if file can be read.
  • invalid? to true whatever why.
  • exception if something wrong happened.
Read the file named `filename`.

 Returns:

* `filename`
* `raw-content` if file can be read.
* `invalid?` to `true` whatever why.
* `exception` if something wrong happened.
raw docstring

search-filesclj

(search-files root-dir pattern)
(search-files root-dir pattern options)

Search files and dirs.

  • root-dir is where the root directory of the search-files
  • pattern is a regular expression or a glob as described in java doc
  • options (Optional, default = {}) are boolean value for :hidden, :recursive and :follow-lins. See babashka fs for details. For instance:
  • (files/search-files "" "**{.clj,.cljs,.cljc,.edn}") search all clj file-paths in pwd directory
Search files and dirs.
* `root-dir` is where the root directory of the search-files
* `pattern` is a regular expression or a glob as described in [java doc](https://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystem.html#getPathMatcher(java.lang.String))
* `options` (Optional, default = {}) are boolean value for `:hidden`, `:recursive` and `:follow-lins`. See [babashka fs](https://github.com/babashka/fs/blob/master/API.md#glob) for details.
For instance:
* `(files/search-files "" "**{.clj,.cljs,.cljc,.edn}")` search all clj file-paths in pwd directory
raw docstring

search-in-parentsclj

(search-in-parents dir file-or-dir)

Search file-or-dir in the parents directories of dir.

Search `file-or-dir` in the parents directories of `dir`.
raw docstring

to-src-dstclj

(to-src-dst copy-actions)

Turns copy-action into a list of pairs containing the source file first and destination file then.

Turns `copy-action` into a list of pairs containing the source file first and destination file then.
raw docstring

write-fileclj

(write-file filename content)

Write the text file filename with its content.

Returns the nil if succesful, map with :exception otherwise

Write the text file `filename` with its `content`.

Returns the nil if succesful, map with :exception otherwise
raw docstring

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

× close