Liking cljdoc? Tell your friends :D

planck.io

Planck I/O functionality.

Planck I/O functionality.
raw docstring

as-relative-pathcljs

(as-relative-path x)

Take an as-file-able thing and return a string if it is a relative path, else throws an exception.

Take an as-file-able thing and return a string if it is
a relative path, else throws an exception.
sourceraw docstring

Coercionscljsprotocol

Coerce between various 'resource-namish' things.

Coerce between various 'resource-namish' things.

as-filecljs

(as-file x)

Coerce argument to a File.

Coerce argument to a [[File]].

as-urlcljs

(as-url x)

Coerce argument to a goog.Uri.

Coerce argument to a `goog.Uri`.
sourceraw docstring

copycljs

(copy input output & opts)

Copies input to output. Returns nil or throws an exception.

Input may be an planck.core/IInputStream or planck.core/IReader created using planck.io, File, or string.

Output may be an planck.core/IOutputStream or [[cljs.core/IWriter]] created using planck.io, or File.

The opts arg is included for compatibility with clojure.java.io/copy but ignored. If translating between char and byte representations, UTF-8 encoding is assumed.

Does not close any streams except those it opens itself (on a File).

Copies input to output. Returns `nil` or throws an exception.

Input may be an [[planck.core/IInputStream]] or [[planck.core/IReader]]
created using `planck.io`, [[File]], or string.

Output may be an [[planck.core/IOutputStream]] or [[cljs.core/IWriter]]
created using `planck.io`, or [[File]].

The opts arg is included for compatibility with `clojure.java.io/copy`
but ignored. If translating between char and byte representations, UTF-8
encoding is assumed.

Does not close any streams except those it opens itself (on a File).
sourceraw docstring

delete-filecljs

(delete-file f)

Delete file f.

Delete file `f`.
sourceraw docstring

directory?cljs

(directory? dir)

Checks if dir is a directory.

Checks if `dir` is a directory.
sourceraw docstring

exists?cljs

(exists? f)

Checks if f exists on disk.

Checks if `f` exists on disk.
sourceraw docstring

Filecljs

source

filecljs

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

Returns a File, passing each arg to [[as-file]]. Multiple-arg versions treat the first argument as parent and subsequent args as children relative to the parent.

Returns a [[File]], passing each arg to [[as-file]]. Multiple-arg versions treat
the first argument as parent and subsequent args as children relative to the
parent.
sourceraw docstring

file-attributescljs

(file-attributes path)

Returns a map containing the attributes of the item at a given path.

Returns a map containing the attributes of the item at a given path.
sourceraw docstring

file-namecljs

(file-name x)

Returns the name (the final path element) of x.

Returns the name (the final path element) of `x`.
sourceraw docstring

file?cljs

(file? x)

Returns true if x is a File.

Returns true if x is a File.
sourceraw docstring

hidden-file?cljs

(hidden-file? x)

Checks if x is hidden (name starts with a . character).

Checks if `x` is hidden (name starts with a `.` character).
sourceraw docstring

input-streamcljs

(input-stream x & opts)

Attempts to coerce its argument into an open planck.core/IInputStream.

Attempts to coerce its argument into an open [[planck.core/IInputStream]].
sourceraw docstring

IOFactorycljsprotocol

Factory functions that create ready-to-use versions of the various stream types, on top of anything that can be unequivocally converted to the requested kind of stream.

Common options include

:append true to open stream in append mode :encoding string name of encoding to use, e.g. "UTF-8".

Callers should generally prefer the higher level API provided by reader, writer, input-stream, and output-stream.

Factory functions that create ready-to-use versions of the various stream
types, on top of anything that can be unequivocally converted to the
requested kind of stream.

Common options include

  `:append`    `true` to open stream in append mode
  `:encoding`  string name of encoding to use, e.g. "UTF-8".

Callers should generally prefer the higher level API provided by [[reader]],
[[writer]], [[input-stream]], and [[output-stream]].

make-output-streamcljs

(make-output-stream x opts)

Creates an planck.core/IOutputStream. See also IOFactory docs.

Creates an [[planck.core/IOutputStream]]. See also [[IOFactory]] docs.

make-writercljs

(make-writer x opts)

Creates an [[cljs.core/IWriter]]. See also IOFactory docs.

Creates an [[cljs.core/IWriter]]. See also [[IOFactory]] docs.

make-readercljs

(make-reader x opts)

Creates an planck.core/IReader. See also IOFactory docs.

Creates an [[planck.core/IReader]]. See also [[IOFactory]] docs.

make-input-streamcljs

(make-input-stream x opts)

Creates an planck.core/IInputStream. See also IOFactory docs.

Creates an [[planck.core/IInputStream]]. See also [[IOFactory]] docs.
sourceraw docstring

list-filescljs

(list-files dir)

Returns a seq of the Files in dir or nil if dir is not a directory.

Returns a seq of the [[File]]s in dir or `nil` if dir is not a directory.
sourceraw docstring

make-parentscljs

(make-parents f & more)

Given the same arg(s) as for file, creates all parent directories of the file they represent.

Given the same arg(s) as for [[file]], creates all parent directories of
the file they represent.
sourceraw docstring

output-streamcljs

(output-stream x & opts)

Attempts to coerce its argument into an open planck.core/IOutputStream.

Attempts to coerce its argument into an open [[planck.core/IOutputStream]].
sourceraw docstring

path-elementscljs

(path-elements x)

Returns the path elements of x as a sequence.

Returns the path elements of `x` as a sequence.
sourceraw docstring

read-linecljsdeprecated

source

readercljs

(reader x & opts)

Attempts to coerce its argument into an open planck.core/IPushbackReader.

Attempts to coerce its argument into an open [[planck.core/IPushbackReader]].
sourceraw docstring

regular-file?cljs

(regular-file? f)

Checks if f is a regular file.

Checks if `f` is a regular file.
sourceraw docstring

resourcecljs

(resource n)

Returns the URI for the named resource, n.

The resource must be either a JAR resource, a file resource or a "bundled" resource. JARs and files are expressed relative to the classpath while "bundled" resources are the namespaces bundled with Planck and are referred to by reference to the file that contains the namespace, eg. cljs.test is "cljs/test.cljs".

Returns the URI for the named resource, `n`.

The resource must be either a JAR resource, a file resource or a "bundled"
resource. JARs and files are expressed relative to the classpath while 
"bundled" resources are the namespaces bundled with Planck and are referred 
to by reference to the file that contains the namespace, eg. `cljs.test` is 
"cljs/test.cljs".
sourceraw docstring

slurpcljsdeprecated

source

spitcljsdeprecated

source

symbolic-link?cljs

(symbolic-link? f)

Checks if f is a symbolic link.

Checks if `f` is a symbolic link.
sourceraw docstring

tty?cljs

(tty? x)

Returns true if xis a file descriptor associated with a terminal, or x is either a Reader/Writer among *in*, *out*, or *err* which is associated with a terminal.

Returns false if x is a file descriptor, *in*, *out*, or *err* and not associated with a terminal, or an invalid file descriptor.

Returns `true` if `x `is a file descriptor associated with a terminal,
or x is either a Reader/Writer among `*in*`, `*out*`, or `*err*` which is
associated with a terminal.

Returns false if `x` is a file descriptor, `*in*`, `*out*`, or `*err*` and
not associated with a terminal, or an invalid file descriptor.
sourceraw docstring

writercljs

(writer x & opts)

Attempts to coerce its argument into an open [[cljs.core/IWriter]].

Attempts to coerce its argument into an open [[cljs.core/IWriter]].
sourceraw docstring

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

× close