io.randomseed.bankster.util.fs

absolute-path?

(absolute-path? pathname)

default-encoding

Default encoding for input files.

empty-str-ary

get-java-classpath-folders

(get-java-classpath-folders)

Lists all directories which exist in Java classpath as a sequence of strings. Returns nil if there are none.

get-resource

added in 1.2.4

(get-resource pname)

For the given pathname, returns the resource URL if the path exists. If the path does not exist, returns nil.

home-dir-pathname

(home-dir-pathname)(home-dir-pathname & paths)

For the given pathnames creates a pathname expressed as a string by prefixing them with user’s home directory obtained from the Java property user.dir with all parts joined using current path name separator.

integer-string?

(integer-string? s)

Returns true if string contains valid integer number.

paths->resource

added in 1.0.0

(paths->resource)(paths->resource & paths)

For the given pathnames creates a resource object that resides within one of the Java resource directories. The resource must exist for the URI to be returned.

prop-pathname

(prop-pathname prop)(prop-pathname prop paths)

For the given Java property name and optional path names creates a path name expressed as a string by prefixing them with the directory obtained from a property with all parts joined using pathname separator.

read-csv

(read-csv resource)

Reads CSV file and returns a lazy sequence of rows.

read-preferences

(read-preferences filename)(read-preferences filename opts)

Reads the given preference file. If the path is relative it will be relative to user’s home directory. Optional options map will be passed to EDN reader.

relative-path?

resource-pathname

(resource-pathname)(resource-pathname & paths)

For the given pathnames creates a pathname expressed as a string that resides within one of the Java resource directories. The path must exist to be returned. WARNING: it will only work for resources on a filesystem, giving you the regular pathname, not URI.

rtrim-comments

(rtrim-comments s)

user-dir-pathname

(user-dir-pathname)(user-dir-pathname & paths)

For the given pathnames creates a pathname expressed as a string by prefixing them with user’s directory (typically a project directory) obtained from the Java property user.dir with all parts joined using current path name separator.