[aida] [Squeak] AIDASite>>backupToFIle

Nicolas Petton petton.nicolas at gmail.com
Tue Jan 15 22:38:37 CET 2008


Le mardi 15 janvier 2008 à 22:34 +0100, Janko Mivšek a écrit :
> Nicolas, looks like original VW methods. Would you explain your 
> backup/restore a bit more? 
Well, it does the same as VW code.
> Is this kind of object fileout/filein, like 
> BOSS (Binary Object Storage) in VW?
Yes
>  What is backed, only this site or more?
The site is backed, and all recursive objects.
> This code works already?
Yes, I think (but you can try it by yourself, I didn't test it a lot)

Nicolas
> 
> JAnko
> 
> Nicolas Petton wrote:
> > 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 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Aida mailing list
> > Aida at aidaweb.si
> > http://lists.aidaweb.si/mailman/listinfo/aida
> 
-------------- 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/16490314/attachment.sig 


More information about the Aida mailing list