Extend FilePlugin to allow a file to be opened using either the file descriptor (fd) or FILE* in Pharo.
Original PR: https://github.com/pharo-project/pharo-vm/pull/108 Updated PR: https://github.com/pharo-project/pharo-vm/pull/142
(both superseeded)
As a (redundant) example of how this can be used, to open stderr (fd=2) for writing:
| stderr |
stderr := BinaryFileStream handle: (FilePluginPrims new openFileDescriptor: 2 writable: true) file: (File named: 'fd2') forWrite: true
stderr nextPutAll: 'Hello World'; lf.
You can view, comment on, or merge this pull request online at:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/222
-- Commit Summary --
* 21462-Open a FileStream based on fd or FILE* * 21462-Open-a-FileStream-based-on-fd-or-FILE
-- File Changes --
M platforms/Cross/plugins/FilePlugin/FilePlugin.h (5) M platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c (35) M src/plugins/FilePlugin/FilePlugin.c (153)
-- Patch Links --
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/222.patch https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/222.diff
@akgrant43 pushed 1 commit.
12586de 21462-Open-a-FileStream-based-on-fd-or-FILE
Merged #222.
vm-dev@lists.squeakfoundation.org