Example: Unloading using CfsFileDescriptor
The file handle parameter required by the ObjectDumper must be an instance of CfsFileDescriptor. The following example shows how one of the methods, unload:intoFileHandle:atOffset:, is used.
| aCfsFileDescriptor anObject result |
 
aCfsFileDescriptor := CfsFileDescriptor
open: 'someobj.swp'
oflag: ORDWR | OCREAT.
aCfsFileDescriptor isCfsError
ifTrue: [^self error: 'Cannot open file'].
anObject := 1@2.
result := ObjectDumper new
unload: anObject
intoFileHandle: aCfsFileDescriptor
atOffset: 0.
aCfsFileDescriptor close.
System message: result printString.
 
Last modified date: 07/02/2019