MTFileStream , MTCompressedFileStream

Class MTFilestream and MTCompressedFileStream are subclasses of class MTStream (5.1). MTCompressedFileStream can read from and write to a compressed file using the tool gzip, which must be installed and accessible on the system. In addition to the methods available from class MTStream, these classes also implement the following methods:

* creation  
+(id)streamFromFile: (NSString*)path create stream to read from file
+(id)streamAppendToFile: (NSString*)path create stream to append to file
+(id)streamToFile: (NSString*)path create stream to write to file

fstr := MTFileSTream streamToFile: (ARGS @ 3).     "open stream (third argument)"

(fstr ok) ifTrue: [
    strx writePDBToStream: fstr.     "write structure in PDB format to the file 3.2''
].
fstr close.     "close stream"

moltalk@moltalk.org      version of this document: V3.0