[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

test[nodeJS] 042 File open/close (sync)

"042-1 Opening,closing files with #openSync:flags: #closeSync:"
| fd |
[fd := NodeJS fs openSync: TestPath, 'Sample.txt' flags:#r.
NodeJS fs closeSync:fd]
   on: Error do: [:ex| self error: '042-1 ' ,ex].


"042-2 Opening,closing files with #openSync:flags:mode: #closeSync:"
| fd |
[ fd := NodeJS fs openSync: TestPath, 'Sample.txt' flags:#r mode:777.
  NodeJS fs closeSync:fd ]
   on: Error do: [:ex| self error: '042-2 ' ,ex ].