Liking cljdoc? Tell your friends :D

cljs-node-io.core


acopycljs

(acopy input output & opts)

Copies input to output via streams asynchronously.

  • Unlike JVM, strings interpreted as filespaths
  • Options are passed to the output stream. @param {(string, File, Buffer, Readable)} input @param {(string, File, Buffer, Readable)} output @return {!Channel} yielding [?err]
Copies input to output via streams asynchronously.
+ Unlike JVM, strings interpreted as filespaths
+ Options are passed to the output stream.
@param {(string, File, Buffer, Readable)} input
@param {(string, File, Buffer, Readable)} output
@return {!Channel} yielding [?err]
raw docstring

as-relative-pathcljs

(as-relative-path x)

a relative path, else IllegalArgumentException. @param {(string|IFile|Uri)} x @return {!string}

a relative path, else IllegalArgumentException.
@param {(string|IFile|Uri)} x
@return {!string}
raw docstring

aslurpcljs

(aslurp p & opts)

@return {!Channel} a which will receive [?err ?data]

@return {!Channel} a which will receive [?err ?data]
raw docstring

aspitcljs

(aspit p content & options)

Async spit. Wait for result before writing again! @param {(string|IFile|Uri)} p :: path to write to @param {(string|buffer.Buffer)} content to write Options: :encoding {string} defaults to utf8. Ignored when content is a buffer :append {bool} - add content to end of existing file. :flags {string} - overrides :append when set :mode {number} - set on newly created files @return {!Channel} recieves [?err]

Async spit. Wait for result before writing again!
@param {(string|IFile|Uri)} p :: path to write to
@param {(string|buffer.Buffer)} content to write
Options:
 :encoding {string} defaults to utf8. Ignored when content is a buffer
 :append {bool} - add content to end of existing file.
 :flags {string} - overrides :append when set
 :mode {number} - set on newly created files
@return {!Channel} recieves [?err]
raw docstring

buffer?cljs


Buffer?cljs

(Buffer? b)

sugar over Buffer.isBuffer @param {*} b @return {!boolean}

sugar over Buffer.isBuffer
@param {*} b
@return {!boolean}
raw docstring

Coercionscljsprotocol

as-filecljs

(as-file x)

Coerce argument to a file.

Coerce argument to a file.

as-urlcljs

(as-url x)

Coerce argument to a URL.

Coerce argument to a URL.

copycljs

(copy input output & opts)

Synchronously copies input to output.. Only supports files and strings/buffers as filepaths @param {(string, File, Buffer)} input @param {(string, File, Buffer)} output @return {nil} throws on error

Synchronously copies input to output..
Only supports files and strings/buffers as filepaths
@param {(string, File, Buffer)} input
@param {(string, File, Buffer)} output
@return {nil} throws on error
raw docstring

delete-filecljs

(delete-file f & [silently])

Delete file f. Raise an exception if it fails unless silently is true. @return {!boolean}

Delete file f. Raise an exception if it fails unless silently is true.
@return {!boolean}
raw docstring

filecljs

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

Returns a reified 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. Use in place of File constructor @return {!IFile}

Returns a reified 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. Use in place of File constructor
@return {!IFile}
raw docstring

file-seqcljs

(file-seq dir)

A tree seq on cljs-node-io.Files @return {LazySeq<File>}

A tree seq on cljs-node-io.Files
@return {LazySeq<File>}
raw docstring

filepathcljs

(filepath a)
(filepath a b)

This is needed to mock the java.io.File constructor. The java File constructor is polymorphic and accepts one or two args: (Uri), (pathstring), (parentstring, childstring), (File, childstring) @return {!string}

This is needed to mock the java.io.File constructor.
The java File constructor is polymorphic and accepts one or two args:
(Uri), (pathstring), (parentstring, childstring), (File, childstring)
@return {!string}
raw docstring

fscljs


input-streamcljs

(input-stream x & opts)

Attempt to create a native stream.Readable. {@link https://nodejs.org/api/stream.html#class-streamreadable} Note that node streams are event driven.

  • stream.Readable => itself
  • buffers => stream.Readable
  • files + strings + goog.Uri => fs.ReadStream @return {!stream.Readable}
Attempt to create a native stream.Readable.
{@link https://nodejs.org/api/stream.html#class-streamreadable}
Note that node streams are event driven.
  + stream.Readable => itself
  + buffers => stream.Readable
  + files + strings + goog.Uri => fs.ReadStream
@return {!stream.Readable}
raw docstring

IOFactorycljsprotocol

Attempts to create a native node stream.

Attempts to create a native node stream.

make-input-streamcljs

(make-input-stream x opts)

create stream.Readable

create stream.Readable

make-output-streamcljs

(make-output-stream x opts)

create stream.Writable

create stream.Writable

make-readercljs

(make-reader x opts)

create stream.Readable

create stream.Readable

make-writercljs

(make-writer x opts)

create stream.Writable

create stream.Writable
raw docstring

make-parentscljs

(make-parents f & more)

Given the same arg(s) as for file, creates all parent directories of the file they represent. @return {!boolean}

Given the same arg(s) as for file, creates all parent directories of
the file they represent.
@return {!boolean}
raw docstring

output-streamcljs

(output-stream x & opts)

Attempt to create a native stream.Writable. {@link https://nodejs.org/api/stream.html#class-streamwritable} Note that node streams are event driven.

  • stream.Writable => itself
  • buffers => stream.Writable
  • files + strings + goog.Uri => fs.WriteStream @return {!stream.Writable}
Attempt to create a native stream.Writable.
{@link https://nodejs.org/api/stream.html#class-streamwritable}
Note that node streams are event driven.
  + stream.Writable => itself
  + buffers => stream.Writable
  + files + strings + goog.Uri => fs.WriteStream
@return {!stream.Writable}
raw docstring

pathcljs


readablecljs

(readable obj)
(readable obj opts)

Tries to create a stream.Readable from obj. Supports iterables & array-likes in addition to those types supported by IOFactory {@link https://nodejs.org/api/stream.html#class-streamreadable} @param {*} obj @return {!stream.Readable}

Tries to create a stream.Readable from obj. Supports iterables & array-likes
in addition to those types supported by IOFactory
{@link https://nodejs.org/api/stream.html#class-streamreadable}
@param {*} obj
@return {!stream.Readable}
raw docstring

readercljs

(reader x & opts)

Attempt to create a native stream.Readable. {@link https://nodejs.org/api/stream.html#class-streamreadable} Note that node streams are event driven.

  • stream.Readable => itself
  • buffers => stream.Readable
  • files + strings + goog.Uri => fs.ReadStream @return {!stream.Readable}
Attempt to create a native stream.Readable.
{@link https://nodejs.org/api/stream.html#class-streamreadable}
Note that node streams are event driven.
  + stream.Readable => itself
  + buffers => stream.Readable
  + files + strings + goog.Uri => fs.ReadStream
@return {!stream.Readable}
raw docstring

slurpcljs

(slurp p & opts)

Returns a string synchronously. Unlike JVM, does not use FileInputStream. Only option at this time is :encoding If :encoding "" (an explicit empty string), returns raw buffer instead of string. @return {(string|buffer.Buffer)}

Returns a string synchronously. Unlike JVM, does not use FileInputStream.
Only option at this time is :encoding
If :encoding "" (an explicit empty string), returns raw buffer instead of string.
@return {(string|buffer.Buffer)}
raw docstring

spitcljs

(spit p content & options)

Writes content synchronously to file f. @param {(string|IFile|Uri)} p :: path to write to @param {(string|buffer.Buffer)} content to write Options: :encoding {string} defaults to utf8. Ignored when content is a buffer :append {bool} - add content to end of existing file. :flags {string} - overrides :append when set :mode {number} - set on newly created files @return {nil} or throws

Writes content synchronously to file f.
@param {(string|IFile|Uri)} p :: path to write to
@param {(string|buffer.Buffer)} content to write
Options:
 :encoding {string} defaults to utf8. Ignored when content is a buffer
 :append {bool} - add content to end of existing file.
 :flags {string} - overrides :append when set
 :mode {number} - set on newly created files
@return {nil} or throws
raw docstring

streamcljs


writablecljs

(writable obj)
(writable obj opts)

Tries to create a stream.Writable from obj @param {*} obj @return {!stream.Writable}

Tries to create a stream.Writable from obj
@param {*} obj
@return {!stream.Writable}
raw docstring

writercljs

(writer x & opts)

Attempt to create a native stream.Writable. {@link https://nodejs.org/api/stream.html#class-streamwritable} Note that node streams are event driven.

  • stream.Writable => itself
  • buffers => stream.Writable
  • files + strings + goog.Uri => fs.WriteStream @return {!stream.Writable}
Attempt to create a native stream.Writable.
{@link https://nodejs.org/api/stream.html#class-streamwritable}
Note that node streams are event driven.
  + stream.Writable => itself
  + buffers => stream.Writable
  + files + strings + goog.Uri => fs.WriteStream
@return {!stream.Writable}
raw docstring

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

× close