Liking cljdoc? Tell your friends :D

aerial.fs


abspathclj

(abspath path)

Return absolute path.

Return absolute path.
raw docstring

assert-files?cljmultimethod

(assert-files? coll)
(assert-files? regex)
(assert-files? file-glob)

Assert that the files (including directories) designated by DESIGNATOR exist. If not, collect all those that do not and raise an ex-info exeception :type :no-such-files :files <set of names>.

DESIGNATOR can be a collection, regex or string. If a collection, each element is taken as a full path of a file; if regex, uses re-directory-files to obtain a collection of paths; if string, treat as file glob and use fs/glob to obtain collection of paths. Check all elements of resulting collection with fs/exists?

Assert that the files (including directories) designated by
DESIGNATOR exist.  If not, collect all those that do not and raise
an ex-info exeception :type :no-such-files :files <set of names>.

DESIGNATOR can be a collection, regex or string.  If a collection,
each element is taken as a full path of a file; if regex, uses
re-directory-files to obtain a collection of paths; if string,
treat as file glob and use fs/glob to obtain collection of paths.
Check all elements of resulting collection with fs/exists?
raw docstring

basenameclj

(basename path)

Return basename (file part) of path. (basename "/a/b/c") -> "c"

Return basename (file part) of path.
(basename "/a/b/c") -> "c"
raw docstring

cdclj

(cd dir)

Change working directory to DIR and return previous working directory. If DIR does not exist do nothing and return nil

Change working directory to DIR and return previous working
directory. If DIR does not exist do nothing and return nil
raw docstring

copyclj

(copy from to)

cpfilesclj

(cpfiles dirdir outdir regex file-type)

Copy a set of files from a set of dirs DIRDIR to an output dir OUTDIR.

FILE-TYPE is the type of files in each dir in DIRDIR that are candidates to be copied. REGEX is a regular expression to filter the set of candidates

EX: (cpfiles "/data2/Bio/Training/MoStos2" "/home/jsa/TMP/X" #"firm" ".sto")

Copy a set of files from a set of dirs DIRDIR to an output dir OUTDIR.

FILE-TYPE is the type of files in each dir in DIRDIR that are
candidates to be copied.  REGEX is a regular expression to filter
the set of candidates

EX: (cpfiles "/data2/Bio/Training/MoStos2" "/home/jsa/TMP/X"
              #"firm" ".sto")
raw docstring

deleteclj

(delete path)

Delete path.

Delete path.
raw docstring

dir-stackclj


directory-filesclj

(directory-files directory file-type)

Return full path qualified file specifications for all files in directory whose suffix matches file-type. Typically file-type would be the type suffix (e.g., .txt or .sto or .fna or .clj or whatever), but could include any part of the file name's suffix. So, giving -new.sto for example, works as well.

Return full path qualified file specifications for all files in
directory whose suffix matches file-type.  Typically file-type
would be the type suffix (e.g., .txt or .sto or .fna or .clj or
whatever), but could include any part of the file name's suffix.
So, giving -new.sto for example, works as well.
raw docstring

directory?clj

(directory? path)

Return true if path is a directory.

Return true if path is a directory.
raw docstring

dirnameclj

(dirname path)

Return directory name of path. (dirname "a/b/c") -> "/a/b"

Return directory name of path.
(dirname "a/b/c") -> "/a/b"
raw docstring

dirstackclj

(dirstack)

Return current directory stack

Return current directory stack
raw docstring

dodirclj

(dodir dir filterf actionf & args)

Map ACTIONF over application of FILTERF to DIR.

FILTERF is a function that operates on a directory returning a result set (typically a set of files). ACTIONF is a function that takes an element of the set and any ancillary supplied arguments ARGS and returns an appropriate result.

Returns the seq of results of ACTIONF minus any nils

Map ACTIONF over application of FILTERF to DIR.

FILTERF is a function that operates on a directory returning a
result set (typically a set of files).  ACTIONF is a function that
takes an element of the set and any ancillary supplied arguments
ARGS and returns an appropriate result.

Returns the seq of results of ACTIONF minus any nils
raw docstring

empty?clj

(empty? path)

executable?clj

(executable? path)

Return true if path is executable.

Return true if path is executable.
raw docstring

exists?clj

(exists? path)

Return true if path exists.

Return true if path exists.
raw docstring

filecljdeprecated

(file arg)
(file parent child)
(file parent child & more)

Returns a java.io.File from string or file args.

Returns a java.io.File from string or file args.
raw docstring

file?clj

(file? path)

Return true if path is a file.

Return true if path is a file.
raw docstring

ftypeclj

(ftype path)

Return the file type suffix of PATH. File type suffix is the last substring element following a '.' in (basename PATH). If no such element is in the basename, returns empty string""

Ex: (ftype "/home/fred/Bio/test.sto") ==> "sto"

Return the file type suffix of PATH.  File type suffix is the last
substring element following a '.' in (basename PATH).  If no such
element is in the basename, returns empty string""

Ex: (ftype "/home/fred/Bio/test.sto") ==> "sto"
raw docstring

fullpathclj

(fullpath filespec-str)

Canonicalize FILESPEC, a string, to a fully qualified file path for the native system. ~ in position one is translated to the users home directory path, / and \ are translated to the file separator for the native system.

Canonicalize FILESPEC, a string, to a fully qualified file path
for the native system.  ~ in position one is translated to the
users home directory path, / and \ are translated to the file
separator for the native system.
raw docstring

globclj

(glob pattern)

glob->regexclj

(glob->regex s)

Takes a glob-format string and returns a regex.

Takes a glob-format string and returns a regex.
raw docstring

homedirclj

(homedir)

Return user home directory path

Return user home directory path
raw docstring

joinclj

(join & parts)

Join parts of path. (join ["a" "b"]) -> "a/b"

Join parts of path.
(join ["a" "b"]) -> "a/b"
raw docstring

listdirclj

(listdir path)

List files under path.

List files under path.
raw docstring

mkdirclj

(mkdir path)

Create a directory.

Create a directory.
raw docstring

mkdirsclj

(mkdirs path)

Make directory tree.

Make directory tree.
raw docstring

movecljmultimethod

(move coll newdir)
(move regex newdir)
(move file-glob newdir)

Move the files (including directories) designated by DESIGNATOR to the directory NEWDIR. DESIGNATOR can be collection, regex or string. If a collection, each element is taken as a full path of a file; if regex, uses re-directory-files to obtain a collection of paths; if string, treat as file glob and use fs/glob to obtain collection of paths. Move all elements of resulting collection to newdir.

Move the files (including directories) designated by DESIGNATOR to
the directory NEWDIR.  DESIGNATOR can be collection, regex or
string.  If a collection, each element is taken as a full path of a
file; if regex, uses re-directory-files to obtain a collection of
paths; if string, treat as file glob and use fs/glob to obtain
collection of paths.  Move all elements of resulting collection to
newdir.
raw docstring

mtimeclj

(mtime path)

Return file modification time.

Return file modification time.
raw docstring

normpathclj

(normpath path)

Return nomralized (canonical) path.

Return nomralized (canonical) path.
raw docstring

popclj

(pop)

Pop current top saved directory from directory stack, make it the current working directory, and return prior working directory. If directory stack is empty, do nothing and return nil.

Pop current top saved directory from directory stack, make it the
current working directory, and return prior working directory. If
directory stack is empty, do nothing and return nil.
raw docstring

pushclj

(push dir)

Push current working directory on directory stack, cd to DIR, and return previous (saved) working directory. If DIR does not exist do nothing and return nil.

Push current working directory on directory stack, cd to DIR, and
return previous (saved) working directory. If DIR does not exist do
nothing and return nil.
raw docstring

pwdclj

(pwd)

Return current working directory path

Return current working directory path
raw docstring

re-directory-filesclj

(re-directory-files directory re)

Return full path qualified file specifications for all files in directory whose name ends with a string matched by re. RE is a regexp (#"regex def" literal or a string that defines a regexp (which will be turned into a pattern).

Return full path qualified file specifications for all files in
directory whose name ends with a string matched by re.  RE is a
regexp (#"regex def" literal or a string that defines a
regexp (which will be turned into a pattern).
raw docstring

readable?clj

(readable? path)

Return true if path is readable.

Return true if path is readable.
raw docstring

renameclj

(rename old-path new-path)

Rename old-path to new-path.

Rename old-path to new-path.
raw docstring

replace-typeclj

(replace-type filespec ext)

Replace the file extension type of FILESPEC to be EXT. The type for FILESPEC is the last part dotted extension. Formally, matches regexp '.[^.]*$'. If EXT is a seq/vec replace extensions in last/first pairings. Last extension replace by (first EXT), then last of that result is replaced by (second EXT), etc.

Replace the file extension type of FILESPEC to be EXT.  The type
for FILESPEC is the last part dotted extension.  Formally, matches
regexp '\.[^.]*$'.  If EXT is a seq/vec replace extensions in
last/first pairings.  Last extension replace by (first EXT), then
last of that result is replaced by (second EXT), etc.
raw docstring

rmclj

(rm file)

Remove a file. Will throw an exception if the file cannot be deleted.

Remove a file. Will throw an exception if the file cannot be deleted.
raw docstring

rm-fclj

(rm-f file)

Remove a file, ignoring any errors.

Remove a file, ignoring any errors.
raw docstring

rm-rclj

(rm-r path & [silently])

Remove a directory. The directory must be empty; will throw an exception if it is not or if the file cannot be deleted.

Remove a directory. The directory must be empty; will throw an
exception if it is not or if the file cannot be deleted.
raw docstring

rm-rfclj

(rm-rf path)

Remove a directory, ignoring any errors.

Remove a directory, ignoring any errors.
raw docstring

separatorclj


sizeclj

(size path)

Return size (in bytes) if file.

Return size (in bytes) if file.
raw docstring

splitclj

(split path)

Split path to componenets. (split "a/b/c") -> ("a" "b" "c")

Split path to componenets.
(split "a/b/c") -> ("a" "b" "c")
raw docstring

symbolic-link?clj

(symbolic-link? path)

Return true if path denotes a symbolic link, false otherwise

Return true if path denotes a symbolic link, false otherwise
raw docstring

tempdirclj

(tempdir)
(tempdir root)

Create a temporary directory

Create a temporary directory
raw docstring

tempfileclj

(tempfile)
(tempfile prefix)
(tempfile prefix suffix)
(tempfile prefix suffix directory)

Create a temporary file.

Create a temporary file.
raw docstring

writeable?clj

(writeable? path)

Return true if path is writeable.

Return true if path is writeable.
raw docstring

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

× close