Liking cljdoc? Tell your friends :D

puppetlabs.kitchensink.file


atomic-writeclj

(atomic-write path write-function)
(atomic-write path write-function permissions)

Write to a file atomically. This takes a function that should operate on a Writer as its first argument. If permissions are specified (as a string of the form "rwxrwxrwx") then the file will be created with those permissions. If not specified and the file already exists then existing permissions will be preserved. If no file exist a default is set.

Write to a file atomically. This takes a function that should operate on a
Writer as its first argument. If permissions are specified (as a string of the
form "rwxrwxrwx") then the file will be created with those permissions. If
not specified and the file already exists then existing permissions will be
preserved. If no file exist a default is set.
sourceraw docstring

atomic-write-stringclj

(atomic-write-string path string)
(atomic-write-string path string permissions)

Write a string to a file atomically. See atomic-write for more details.

Write a string to a file atomically. See atomic-write for more details.
sourceraw docstring

delete-recursivelyclj

(delete-recursively path-to-delete)

Given a path to a directory, delete everything in the directory recursively. Given a path to a file, it will delete that file. Returns true if successful, false if not. Failures are logged at the info level. Uses a stack based tail recursion method to avoid using a recursive stack

Given a path to a directory, delete everything in the directory recursively.
Given a path to a file, it will delete that file.
Returns true if successful, false if not. Failures are logged at the info level.
Uses a `stack` based tail recursion method to avoid using a recursive stack
sourceraw docstring

dir+file->pathclj

(dir+file->path directory file)
source

empty-file-attributesclj

source

get-permsclj

(get-perms path)

Returns the currently set permissions of the given file path.

Returns the currently set permissions of the given file path.
sourceraw docstring

source

perms->attributeclj

(perms->attribute permissions)
source

set-permsclj

(set-perms path permissions)

Set the provided permissions on the given path. The permissions string is in the form of the standard 9 character posix format, e.g. "rwxr-xr-x".

Set the provided permissions on the given path. The permissions string is in
the form of the standard 9 character posix format, e.g. "rwxr-xr-x".
sourceraw docstring

str->pathclj

(str->path path)
source

untar-fileclj

(untar-file path-to-tar-file output-directory)

Given a path to a tar file, and a path to the parent directory to untar the repo in, recreate the contents of the tar file Note: does not recreate original permissions, or support symlinks.

Given a path to a tar file, and a path to the parent directory to untar the repo in, recreate the contents of the tar file
Note: does not recreate original permissions, or support symlinks.
sourceraw docstring

unzip-fileclj

(unzip-file input-file output-file)

Given a path to an input file, and a path to an output location, attempt to unzip the file. Will not overwrite the same path with the output

Given a path to an input file, and a path to an output location, attempt to unzip the file.
Will not overwrite the same path with the output
sourceraw docstring

write-tar-stream-to-fileclj

(write-tar-stream-to-file input-stream output-path buffer)
source

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

× close