[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
test[nodeJS] 041 Folder operations (async)
"041-5 Creating folders with #mkdir:with:"
NodeJS fs mkdir: TestPath, 'TestFOLDER1' with: [:error|
error isNil ifFalse: [ ^self error: '041-5' ,error]
].
"041-6 Creating folders with #mkdir:mode:with:"
NodeJS fs mkdir: TestPath, 'TestFOLDER2' mode: 0777 with: [:error|
error isNil ifFalse: [ ^self error: '041-6' ,error]
].
"041-7 Reading folder with #readdir:with:"
NodeJS fs readdir: TestPath with: [:error :files|
error isNil ifFalse: [ ^self error: '041-7 ' ,error ].
"self print: 'OK-> 041-7 Reading folder ./ ',files asString."
].
"041-8 Deleting folders with #rmdir:with:"
NodeJS fs rmdir: TestPath, 'TestFOLDER1' with: [:error |
(error isNil) ifFalse: [ ^self error: '041-8 ' ,error]
].
NodeJS fs rmdir: TestPath, 'TestFOLDER2' with: [:error |
(error isNil) ifFalse: [ ^self error: '041-8 ' ,error]
].