Types
SameFileError = object of Error
- Source Edit
Procs
proc copyfileobj(s, d: File; length = COPY_BUFSIZE) {. ...raises: [IOError, OSError], tags: [WriteIOEffect, ReadIOEffect], forbids: [].}
-
shutil.copyfileobj but for Nim's File
if length is negative, it means copying the data without looping over the source data in chunks
Source Edit proc get_terminal_size(fallback = (80, 24)): terminal_size {....raises: [], tags: [ReadEnvEffect], forbids: [].}
-
Hint: this does not simply refer to environment variable,
call os.get_terminal_size. This is a wrapper around terminalSize of std/terminal, which is more steady, returning meaningful result even when stdout is not associatd with a terminal.
Source Edit