[View] [Edit] [Lock] [References] [Attachments] [History] [Home] [Changes] [Search] [Help]
sample[jx8-android] outputToFile
SwikiCodeRobot @> #JX8AndroidOutputToFile |
"#outputToFile: for writing files"
| pathName text |
pathName := '*/A8/sample.txt'.
text := Object fileOut.
text outputToFile: pathName.
text = pathName fileContents ifFalse: [
^self error: 'Wrong file contents'
].
(File pathName: pathName) delete.
self print: #ok.
"#outputToFile: save an image snapshot"
| pathName |
pathName := '*/A8/jx8-android.image.js'.
Snapshot contents outputToFile: pathName.
self print: 'Image saved as ',pathName.