[Seaside] [file libraries] Write to disk feature
ssastre at seaswork.com
Wed Aug 22 20:14:15 UTC 2007
there is a bug in writing libraries to disk (a conditional for binary
and plain text is inverted). Here is a patch I'm using:
SeasidePlatformSupport>>write: aStringOrByteArray toFile: aFileNameString
"Writes aStringOrByteArray to a file named aFilenameString in the folder
Note: if aStringOrByteArray is a string it writes a CR LF kind of file and
| folder stream fullFilePath |
folder := FileDirectory default directoryNamed: aFolderString.
fullFilePath := folder fullNameFor: aFileNameString.
stream := aStringOrByteArray isString
ifTrue: [ (CrLfFileStream forceNewFileNamed: fullFilePath) binary ]
ifFalse: [ (FileStream forceNewFileNamed: fullFilePath) ascii ].
[ stream nextPutAll: aStringOrByteArray ]
ensure: [ stream close ]
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside