[aida] [Squeak] AIDASite>>backupToFIle

Nicolas Petton petton.nicolas at gmail.com
Tue Jan 15 20:54:08 CET 2008


Hi,

The backup/restore feature is really nice, but the code doesn't seems to
be ported. So I replaced it with :

AIDASite>>backupToFile
	| filename fileDir |
	filename := 'aidasite-', self name, '.obj'.
	fileDir := FileDirectory forFileName: filename.
	(fileDir fileExists: filename) ifTrue: 
		[fileDir copyFileWithoutOverwriteConfirmationNamed: filename
toFileNamed: ('aidasite-', self name, '-old.obj')].
	(FileStream fileNamed: filename)
		fileOutClass: nil andObject: self


AIDASite>>restoreSiteNamed: aString
	| filename site |
	filename := 'aidasite-', aString, '.obj'.
	site := (FileStream fileNamed: filename) fileInObjectAndCode.
	^site

I also think it would be nice to have backup files with dates. What do
you think ?

Cheers,

Nicolas 
-- 
Nicolas Petton
http://nico.bioskop.fr
            ___
          ooooooo
         OOOOOOOOO
        |Smalltalk|
         OOOOOOOOO
          ooooooo
           \   /
            [|]
--------------------------------
Ma clé GPG est disponible ici :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
-------------- section suivante --------------
Une pi?ce jointe non texte a ?t? nettoy?e...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url: http://lists.aidaweb.si/pipermail/aida/attachments/20080115/d818a534/attachment.sig 


More information about the Aida mailing list