file: file.aus

class: FileStream

[340:14] (extern: com.lehman.aussom.stdlib.AussomFileStream) extends: object

FileStream is an Aussom object which provides support for reading and writing files in a streaming manner. Use a FileStream when a file is too large to keep fully in memory or when the work can be processed one chunk at a time. A FileStream is opened in one of three modes: "r" for reading, "w" for writing (truncates the file), or "a" for appending. The same stream cannot be used for both reading and writing at the same time. Both text and binary chunks are supported on any open stream, and chunk size is set per call. The typical usage pattern is: fs = new FileStream(); fs.open("big.txt", "r"); while (!fs.eof()) { chunk = fs.read(8192); // process chunk ... } fs.close();

Methods

class: file

[10:21] static (extern: com.lehman.aussom.stdlib.AussomFile) extends: object

Aussom file is a static class with a bunch of functions for manipulating files. It has some basic read/write files, along with list, rm, rename, delete, and many others.

Methods