Deleting a Magma Repository

Avi Bryant avi at beta4.com
Sun Mar 9 02:59:25 UTC 2003


On Sat, 8 Mar 2003, Chad Nantais wrote:

> I am setting up an SUnit suite to test storage of my library of
> business objects in a Magma repository.  I have no problem creating a
> repository, connecting to it from a client, committing transactions and
> disconnecting.  However, I would like to have the tearDown method of my
> test delete the repository that was created in the setUp method so that
> I can start fresh in subsequent tests.  I am having no luck calling
> MagmaRepositoryController>>delete: 'c:\myMagmaFolder\myRepository.magma'
> What would be the correct sequence of calls I would need in order to
> delete the repository from within Squeak?

Chad,

It's possible that I'm missing something, but is there any reason not to
simply delete the files directly? eg,

|dir|
dir := FileDirectory on: 'c:\myMagmaFolder'.
dir deleteFileNamed: 'myRepository.magma'.
dir deleteFileNamed: 'myRepository.idx'.

Avi



More information about the Squeak-dev mailing list