read multimethod

Methods

read(fname:Str) Source: bootstrap.ngs:97
Fetches the whole file

Parameters

fnameFile name to read

Returns

Whole file as a string
read(fd:Int, count:Any=null) Source: stdlib.ngs:4155
Read all data from a file referenced by file descriptor without parsing it.

Parameters

fdFile descriptor to read from

Returns

Str

Example

read(0)  # All data from stdin
read() Source: stdlib.ngs:4182
Read all data from a file referenced by file descriptor 0 (stdin) without parsing it. Same as read(0)
read(p:Pipe, count:Any=null) Source: stdlib.ngs:4290
Read from Pipe without parsing. TODO: document if it throws.

Returns

read data

Example

data = read(myipe)
read(cp:CommandsPipeline, count:Any=null) Source: stdlib.ngs:4906
Read from last process of CommandsPipeline

Example

p = $(seq 3 | tac |);
data = read(p);
p.close()
read(fname:Str) Source: stdlib.ngs:6104
Read whole file
read(f:File) Source: stdlib.ngs:6110
Read whole file