File System helpers.
File System helpers.
(absolute? path)
Checks if the provided path is absolute.
Checks if the provided path is absolute.
(create-dir path)
(create-dir path perms)
Create a new directory.
Create a new directory.
(create-tempdir)
(create-tempdir prefix)
Creates a temp directory on the filesystem.
Creates a temp directory on the filesystem.
(create-tempfile & {:keys [suffix prefix]})
Create a temporal file.
Create a temporal file.
(delete path)
Delete recursiverly a directory or file.
Delete recursiverly a directory or file.
(directory? path)
(directory? path params)
Checks if the provided path is a directory.
Checks if the provided path is a directory.
(executable? path)
Checks if the provided path is executable.
Checks if the provided path is executable.
(exists? path)
(exists? path params)
Check if the provided path exists.
Check if the provided path exists.
(ext path)
Return the extension part of a file.
Return the extension part of a file.
(file path)
Converts the path to a java.io.File instance.
Converts the path to a java.io.File instance.
(file? v)
Check if v
is an instance of java.io.File
Check if `v` is an instance of java.io.File
(hidden? path)
Check if the provided path is hidden.
Check if the provided path is hidden.
(join base path)
(join base path & more)
Resolve path on top of an other path.
Resolve path on top of an other path.
(link? path)
Checks if the provided path is a link.
Checks if the provided path is a link.
(list-dir path)
(list-dir path glob)
Return a lazy seq of files and directories found under the provided directory. The order of files is not guarrantied.
NOTE: the seq should be fully realized in order to properly release all acquired resources for this operation. Converting it to vector is an option for do it.
Return a lazy seq of files and directories found under the provided directory. The order of files is not guarrantied. NOTE: the seq should be fully realized in order to properly release all acquired resources for this operation. Converting it to vector is an option for do it.
(make-permissions expr)
Generate a array of FileAttribute
instances
generated from rwxr-xr-x
kind of expressions.
Generate a array of `FileAttribute` instances generated from `rwxr-xr-x` kind of expressions.
(move src dst)
(move src dst flags)
Move or rename a file to a target file.
By default, this method attempts to move the file to the target file, failing if the target file exists except if the source and target are the same file, in which case this method has no effect. If the file is a symbolic link then the symbolic link itself, not the target of the link, is moved.
This method may be invoked to move an empty directory. When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. For example, renaming a directory on the same FileStore will usually not require moving the entries in the directory. When moving a directory requires that its entries be moved then this method fails (by throwing an IOException).
Move or rename a file to a target file. By default, this method attempts to move the file to the target file, failing if the target file exists except if the source and target are the same file, in which case this method has no effect. If the file is a symbolic link then the symbolic link itself, not the target of the link, is moved. This method may be invoked to move an empty directory. When invoked to move a directory that is not empty then the directory is moved if it does not require moving the entries in the directory. For example, renaming a directory on the same FileStore will usually not require moving the entries in the directory. When moving a directory requires that its entries be moved then this method fails (by throwing an IOException).
(name path)
Return a path representing the name of the file or directory, or null if this path has zero elements.
Return a path representing the name of the file or directory, or null if this path has zero elements.
(path fst)
(path fst & more)
Create path from string or more than one string.
Create path from string or more than one string.
(path->input-stream path)
(path->output-stream path)
(path? v)
Return true
if provided value is an instance of Path.
Return `true` if provided value is an instance of Path.
(permissions path)
(permissions path params)
Returns the string representation of the permissions of the provided path.
Returns the string representation of the permissions of the provided path.
(readable? path)
Check if the provided path is readable.
Check if the provided path is readable.
(real path)
(real path params)
Converts f into real path via Path#toRealPath.
Converts f into real path via Path#toRealPath.
(regular-file? path)
(regular-file? path params)
Checks if the provided path is a plain file.
Checks if the provided path is a plain file.
(relative? path)
Check if the provided path is relative.
Check if the provided path is relative.
(relativize base other)
Returns the relationship between two paths.
Returns the relationship between two paths.
(split-ext path)
Returns a vector of [^String name ^String extension]
.
Returns a vector of `[^String name ^String extension]`.
(tempfile &
{:keys [suffix prefix max-retries]
:or {suffix ".tmp" max-retries 1000 prefix "datoteka."}})
Retrieves a candidate tempfile (without creating it).
Retrieves a candidate tempfile (without creating it).
(writable? path)
Check if the provided path is writable.
Check if the provided path is writable.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close