Example: Loading using CfsFileDescriptor
The file handle parameter required by the ObjectLoader must also be an instance of CfsFileDescriptor. This example shows how loadFromFileHandle:atOffset: is used.
| aCfsFileDescriptor someObject |
 
aCfsFileDescriptor := CfsFileDescriptor
open: 'someobj.swp'
oflag: ORDONLY.
aCfsFileDescriptor isCfsError
ifTrue: [^self error: 'Cannot open file'].
someObject := ObjectLoader new
loadFromFileHandle: aCfsFileDescriptor
atOffset: 0.
aCfsFileDescriptor close.
someObject inspect.
 
Last modified date: 07/02/2019