CrLfFileStream oldFileNamed:
Lex Spoon
lex at cc.gatech.edu
Sat Nov 8 21:05:56 UTC 2003
"Germán S. Arduino" <gsa at softhome.net> wrote:
> Are only .desktop files (of Gnome desktop configuration), aren't bigs, and
> I would haven't problems in create a new ones and delete or (better)
> rename
> the original files, but searching in FileStream, StandarFileStream
> and CrLfFileStream I can't find the right methods to make that.
>
Well, you could write to .desktop.tmp or .desktop.new. To do the
renaming, rename:toBe: will probably work:
FileDirectory default rename: (oldname) toBe: (new name)
I am guessing that in the Unix VM this will happily overwrite the
existing file. If that doesn't work, you can always delete the file
first using deleteFileNamed:, and then do a rename.
> > Besides, if you really want efficiency, you wouldn't
> > be using a text file at all, but would be using a database. :)
>
> Why use databases having real object technology as Smalltalk! :)
Indeed. We'd probably all love to do things like:
Files at: '.desktop' put: (myDesktopLayoutObject)
:)
Lex
More information about the Squeak-dev
mailing list
|