[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
test[nodeJS] 041 Folder operations (sync)
"041-1 Reading folder with #readdirSync:"
| files |
[files := NodeJS fs readdirSync: TestPath]
on: Error do: [:ex| ^self error: '041-1 ' ,ex ].
"self print: 'OK-> 041-1 Reading folder ./ ',files asString."
"041-2 Creating folders with #mkdirSync:mode:"
[ NodeJS fs mkdirSync: TestPath,'TestFOLDER3' mode: 0777 ]
on: Error
do: [:ex| ^self error: '041-2 ' ,ex].
"041-3 Creating folders with #mkdirSync:"
[ NodeJS fs mkdirSync: TestPath,'TestFOLDER4']
on: Error
do: [:ex| ^self error: '041-3 ' ,ex].
"041-4 Deleting folders with #rmdirSync:"
[NodeJS fs rmdirSync: TestPath,'TestFOLDER3']
on: Error
do: [:ex | ^self error: '041-4 ' ,ex].
[NodeJS fs rmdirSync: TestPath,'TestFOLDER4']
on: Error
do: [:ex | ^self error: '041-4 ' ,ex].