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:4355
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:4382
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:4490
Read from Pipe without parsing. TODO: document if it throws.

Returns

read data

Example

data = read(myipe)
read(pp:ProcessesPipeline, count:Any=null) Source: stdlib.ngs:5208
Read from last process of ProcessesPipeline

Example

p = $(seq 3 | tac |);
data = read(p);
p.close()
read(fname:Str) Source: stdlib.ngs:6492
Read whole file
read(f:File) Source: stdlib.ngs:6498
Read whole file
read(t:Terminal, count:Int=1) Source: autoload/Terminal.ngs:39
Undocumented