Smalltalk/X WebserverDocumentation of class 'FileText': | |
Class: FileTextInheritance:Object | +--Collection | +--SequenceableCollection | +--OrderedCollection | +--StringCollection | +--FileText
Description:FileText represents the contents of a text-file and allows transparent access, via #at:, as if the lineStrings were in memory - although, only a small portion of the file is actually present in a cache. Only the offsets of the text-lines are stored in an internal array to save memory space. The #at: method fetches the line from the file. Individual textlines may be replaced by strings (via #at:put:). The underlying file is NOT updated in this case. Care should be taken, if the underlying file is rewritten - you have to manually update/flush the pointers. Never rewrite the file using the data from a FileText. If you keep a file's contents in a FileText object and want to rewrite that file, you MUST write to a temporary file first. Otherwise, you will clobber the contents. This is an EXPERIMENTAL class, use at your own risk. (If at all, use fileText for huge readonly texts only.) Class protocol:instance creation
Instance protocol:accessing
|
|
ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 30 Dec 2024 17:09:55 GMT |