Liking cljdoc? Tell your friends :D

clojure-commons.file-utils


*max-temp-dir-attempts*clj

The maximum number of times to attempt to create a temporary directory.

The maximum number of times to attempt to create a temporary directory.
sourceraw docstring

abs-pathclj

(abs-path file-path)

Converts a path to an absolute path.

Converts a path to an absolute path.
sourceraw docstring

abs-path?clj

(abs-path? file-path)

Returns true if the path passed in is an absolute path.

Returns true if the path passed in is an absolute path.
sourceraw docstring

add-trailing-slashclj

(add-trailing-slash input-string)

Adds a trailing slash to 'input-string' if it doesn't already have one.

Adds a trailing slash to 'input-string' if it doesn't already have one.
sourceraw docstring

basenameclj

(basename path)

Returns the basename of 'path'.

This works by calling getName() on a java.io.File instance. It's prefered over last-dir-in-path for that reason.

Parameters: path - String containing the path for an item in iRODS.

Returns: String containing the basename of path.

Returns the basename of 'path'.

This works by calling getName() on a java.io.File instance. It's prefered
over last-dir-in-path for that reason.

Parameters:
  path - String containing the path for an item in iRODS.

Returns:
  String containing the basename of path.
sourceraw docstring

build-result-folder-pathclj

(build-result-folder-path submission)
source

dir?clj

(dir? file-path)

Tests whether the path is a directory.

Tests whether the path is a directory.
sourceraw docstring

dirnameclj

(dirname path)

Returns the dirname of 'path'.

This works by calling getParent() on a java.io.File instance.

Parameters: path - String containing the path for an item in iRODS.

Returns: String containing the dirname of path.

Returns the dirname of 'path'.

This works by calling getParent() on a java.io.File instance.

Parameters:
  path - String containing the path for an item in iRODS.

Returns:
  String containing the dirname of path.
sourceraw docstring

exists?clj

(exists? & filepaths)

Tests whether the given paths exist on the filesystem.

Tests whether the given paths exist on the filesystem.
sourceraw docstring

file?clj

(file? file-path)

Tests whether the path is a file.

Tests whether the path is a file.
sourceraw docstring

normalize-pathclj

(normalize-path file-path)

Normalizes a file path on Unix systems by eliminating '.' and '..' from it. No attempts are made to resolve symbolic links.

Normalizes a file path on Unix systems by eliminating '.' and '..' from it.
No attempts are made to resolve symbolic links.
sourceraw docstring

path-joinclj

(path-join & paths)

Joins paths together and returns the resulting path as a string. nil and empty strings are silently discarded.

Parameters: paths - a parameter list of names to join together to form a path.

Returns: It returns the path as a string.

Joins paths together and returns the resulting path as a string. nil and empty strings are
silently discarded.

Parameters:
  paths - a parameter list of names to join together to form a path.

Returns:
  It returns the path as a string.
sourceraw docstring

rec-deleteclj

(rec-delete f)

Recursively deletes all files in a directory structure rooted at the given directory. Note that this recursion does consume stack space. This shouldn't be a problem, however, because a directory structure that is deep enough to cause a stack overflow will probably create a path that is too long for the OS to support.

Recursively deletes all files in a directory structure rooted at the given
directory.  Note that this recursion does consume stack space.  This
shouldn't be a problem, however, because a directory structure that is deep
enough to cause a stack overflow will probably create a path that is too
long for the OS to support.
sourceraw docstring

rm-last-slashclj

(rm-last-slash path)

Returns a new version of 'path' with the last slash removed.

Parameters: path - String containing a path.

Returns: New version of 'path' with the trailing slash removed.

Returns a new version of 'path' with the last slash removed.

Parameters:
  path - String containing a path.

Returns: New version of 'path' with the trailing slash removed.
sourceraw docstring

temp-dirclj

(temp-dir prefix err-fn)
(temp-dir prefix parent err-fn)

Creates a temporary directory. This function is used by the with-temp-dir macro to create the temporary directory.

Creates a temporary directory.  This function is used by the with-temp-dir
macro to create the temporary directory.
sourceraw docstring

with-temp-dircljmacro

(with-temp-dir sym prefix err-fn & body)

Creates a temporary directory and binds a file representing the path to the temporary directory within the user's current working directory. The body is executed in a try expression with a finally clause that recursively deletes the directory. If the directory can't be created then the provided error function will be called with three arguments: the path to the parent directory, the directory name prefix and the base name that was used. The dynamic variable, max-temp-dir-attempts, can be used to specify the maximum number of times to try to create the temporary directory. The default value of this variable is 10.

Creates a temporary directory and binds a file representing the path to the
temporary directory within the user's current working directory.  The body
is executed in a try expression with a finally clause that recursively
deletes the directory.  If the directory can't be created then the provided
error function will be called with three arguments: the path to the parent
directory, the directory name prefix and the base name that was used.  The
dynamic variable, *max-temp-dir-attempts*, can be used to specify the
maximum number of times to try to create the temporary directory.  The
default value of this variable is 10.
sourceraw docstring

with-temp-dir-incljmacro

(with-temp-dir-in sym parent prefix err-fn & body)

Creates a temporary directory inside a specified parent directory and binds a file representing the path to the temporary directory to a provided symbol. The body is executed in a try expression with a finally clause that recursively deletes the directory. If the directory can't be created then the provided error function will be called with three arguments: the path to the parent directory, the directory name prefix and the base name that was used. The dynamic variable, max-temp-dir-attempts, can be used to specify the maximum number of times to try to create the temporary directory The default value of this variable is 10.

Creates a temporary directory inside a specified parent directory and binds a
file representing the path to the temporary directory to a provided symbol.
The body is executed in a try expression with a finally clause that
recursively deletes the directory.  If the directory can't be created then
the provided error function will be called with three arguments: the path to
the parent directory, the directory name prefix and the base name that was
used.  The dynamic variable, *max-temp-dir-attempts*, can be used to specify
the maximum number of times to try to create the temporary directory  The
default value of this variable is 10.
sourceraw docstring

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

× close