(delete-file file)
deletes file recursively
deletes file recursively
(delete-file-parent file)
calls delete-file on parent of file
calls delete-file on parent of file
(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
(file-list file)
returns a vector of files found in file (a folder)
returns a vector of files found in file (a folder)
(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
(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
(resource-as-file resource)
returns a temp file containing resource
returns a temp file containing resource
(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
(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
(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
(tmp-file)
returns a tmp file File object
returns a tmp file File object
(tmp-folder)
returns a tmp folder File object
returns a tmp folder File object
(touch-tmp name)
creates a file named name in a tmp dir
creates a file named name in a tmp dir
(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
(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))
(with-tmp-file file & body)
executes body and insures the file is deleted
executes body and insures the file is deleted
(with-tmp-files files & body)
executes body and insures the files are deleted
executes body and insures the files are deleted
(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
(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))
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close