'From etoys2.3 of 12 December 2007 [latest update: #1832] on 12 December 2007 at 9:53:19 am'! "Change Set: SavedUpdateEncoding-yo Date: 12 December 2007 Author: Yoshiki Ohshima The locally saved change set should be treated as binary."! !Utilities class methodsFor: 'fetching updates' stamp: 'yo 12/12/2007 09:51'! saveUpdate: doc onFile: fileName "Save the update on a local file. With or without the update number on the front, depending on the preference #updateRemoveSequenceNum" | file fName pos updateDirectory | (FileDirectory default directoryNames includes: 'updates') ifFalse: [FileDirectory default createDirectory: 'updates']. updateDirectory _ FileDirectory default directoryNamed: 'updates'. fName _ fileName. (Preferences valueOfFlag: #updateRemoveSequenceNum) ifTrue: [pos _ fName findFirst: [:c | c isDigit not]. fName _ fName copyFrom: pos to: fName size]. doc reset; binary. (updateDirectory fileExists: fName) ifFalse: [file _ updateDirectory newFileNamed: fName. file binary. file nextPutAll: doc contents. file close]. ! !