Add C function dup and dup2 posix to system/io (#15675)
* * Add handle to dup and dup2 posix as duplicate and duplicateTo in std/ioutils. * Added small test & changelog entry * Fixed import in tioutils removed when isMainModule * * Nest test inside block. Rename proc var -> let in captureStdout * Renamed tmpfile to iotuils.txt * Added block: # duplicate, duplicateTo * Improved docstring * Clean non-idiomatic code * Added runnable examples * rm 2 trailing space in expected output * Made syntax prettier * Runnable example: file in getTempDir() * Tmp -> Temp * Fixed runnableExamples on windows
This commit is contained in:
parent
066f3ebc2a
commit
12143d90c8
3 changed files with 136 additions and 1 deletions
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
- `prelude` now works with the JavaScript target.
|
||||
|
||||
- Added `ioutils` module containing `duplicate` and `duplicateTo` to duplicate `FileHandle` using C function `dup` and `dup2`.
|
||||
|
||||
|
||||
## Language changes
|
||||
|
||||
|
|
@ -18,4 +20,3 @@
|
|||
|
||||
|
||||
## Tool changes
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue