Liking cljdoc? Tell your friends :D

komcrad-utils.io


as-tmpclj

(as-tmp filename)
source

available-portclj

(available-port)
source

available-port?clj

(available-port? n)
source

delete-fileclj

(delete-file file)

deletes file recursively

deletes file recursively
sourceraw docstring

delete-file-parentclj

(delete-file-parent file)

calls delete-file on parent of file

calls delete-file on parent of file
sourceraw docstring

existing-fileclj

(existing-file s)

returns a file object based on path s. returns nil if file doesn't exist

returns a file object based on path s.
returns nil if file doesn't exist
sourceraw docstring

fileclj

(file s)
source

file-listclj

(file-list file)

returns a vector of files found in file (a folder)

returns a vector of files found in file (a folder)
sourceraw docstring

file-moveclj

(file-move input-file output-file)
source

file-move-tmpclj

(file-move-tmp input-file)
source

files-partial-matchclj

(files-partial-match files filename)

given a vector of files, returns a vector of files whos names match filename

given a vector of files, returns a vector of files whos names match filename
sourceraw docstring

filter-interfacesclj

(filter-interfaces s)
source

get-local-interfacesclj

(get-local-interfaces)
source

host-port-listening?clj

(host-port-listening? ip n)

returns true if a host at ip is listing on port n

returns true if a host at ip is listing on port n
sourceraw docstring

ipv4-from-interfaceclj

(ipv4-from-interface interface)
source

local-ipclj

(local-ip)
source

parentclj

(parent file)

return parent of file

return parent of file
sourceraw docstring

read-streamclj

(read-stream is)
source

resource-as-fileclj

(resource-as-file resource)

returns a temp file containing resource

returns a temp file containing resource
sourceraw docstring

resource-as-folder-childclj

(resource-as-folder-child resource)

returns a file (in a tmp folder) with the same name as resource

returns a file (in a tmp folder) with the same name as resource
sourceraw docstring

smart-deleteclj

(smart-delete file)

calls delete-file on parent of file if it matches ^komcrad-utils

calls delete-file on parent of file if it matches ^komcrad-utils
sourceraw docstring

stream-as-atomclj

(stream-as-atom is)
source

tempifyclj

(tempify filename)

returns a file object inside a tmp folder. retains original name of file

returns a file object inside a tmp folder.
retains original name of file
sourceraw docstring

tmp-fileclj

(tmp-file)

returns a tmp file File object

returns a tmp file File object
sourceraw docstring

tmp-folderclj

(tmp-folder)

returns a tmp folder File object

returns a tmp folder File object
sourceraw docstring

touch-tmpclj

(touch-tmp name)

creates a file named name in a tmp dir

creates a file named name in a tmp dir
sourceraw docstring

wait-fileclj

(wait-file s)
(wait-file s timeout)

waits for a file described by path s. returns file or nil

waits for a file described by path s. returns file or nil
sourceraw docstring

with-streams-as-atomscljmacro

(with-streams-as-atoms bindings & body)
source

with-tfcljmacro

(with-tf [file] & body)

binds the given symbol to a tmpfile, executes body with access to the tmpfile and insures the file gets deleted Example: (with-tf [my-file] (spit my-file "hello") (slurp my-file))

binds the given symbol to a tmpfile, executes body with access
to the tmpfile and insures the file gets deleted
Example: (with-tf [my-file]
           (spit my-file "hello")
           (slurp my-file))
sourceraw docstring

with-tmp-filecljmacro

(with-tmp-file file & body)

executes body and insures the file is deleted

executes body and insures the file is deleted
sourceraw docstring

with-tmp-filescljmacro

(with-tmp-files files & body)

executes body and insures the files are deleted

executes body and insures the files are deleted
sourceraw docstring

with-tmp-folder-childrencljmacro

(with-tmp-folder-children files & body)

executes body and insures the files are deleted along with their parents

executes body and insures the files are deleted
along with their parents
sourceraw docstring

with-tmpscljmacro

(with-tmps bindings & body)

Executes body and insures the files are deleted. Syntax similar to let: (with-tmps [file1 (tmp-file) file2 (resource-as-file "resource")] (println file1 file2))

Executes body and insures the files are deleted.
Syntax similar to let:
(with-tmps [file1 (tmp-file) file2 (resource-as-file "resource")]
  (println file1 file2))
sourceraw docstring

zero-fillclj

(zero-fill file n)

adds n bytes to file

adds n bytes to file
sourceraw docstring

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

× close