Utility functions for dealing with file system objects, and in/out streams.
Utility functions for dealing with file system objects, and in/out streams.
(direct-url-to-file? url)Does this URL point to a file directly? i.e., does it use the file: protocol.
Does this URL point to a file directly? i.e., does it use the file: protocol.
(last-modified-time this)Return the last modified time of a File or resource URL.
Return the last modified time of a File or resource URL.
(resource-artifact resource)Return the File from which the given resource URL would be loaded.
For file: URLs returns the location of the resource itself, for
jar:..!/... URLs returns the location of the archive containing the
resource. Returns a fully qualified File, even when the URL is relative.
Throws when the URL is not a file: or jar: URL.
Return the File from which the given resource URL would be loaded. For `file:` URLs returns the location of the resource itself, for `jar:..!/...` URLs returns the location of the archive containing the resource. Returns a fully qualified File, even when the URL is relative. Throws when the URL is not a `file:` or `jar:` URL.
(resource-jarfile jar-resource)Given a jar:file:...!/... URL, return the location of the jar file on the filesystem. Returns nil on any other URL.
Given a jar:file:...!/... URL, return the location of the jar file on the filesystem. Returns nil on any other URL.
(url-protocol url)Get the URL protocol as a string, e.g. http, file, jar.
Get the URL protocol as a string, e.g. http, file, jar.
(url-to-file-within-archive? url)Does this URL point to a file inside a jar (or zip) archive? i.e., does it use the jar: protocol.
Does this URL point to a file inside a jar (or zip) archive? i.e., does it use the jar: protocol.
(wrap-silently f)Middleware that executes (f) without printing to System/out or System/err.
(Note that System/out is different from *out*)
Middleware that executes `(f)` without printing to `System/out` or `System/err`. (Note that `System/out` is different from `*out*`)
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |