File moving across directories seems inoperative

Rik Fischer Smoody riks at smOO.com
Tue Dec 11 22:47:10 UTC 2001


I use one form or another of Smalltalk for many things.
Wanted to make a simple utility in Squeak to look for good stuff among the chaff of
a scratch directory and *MOVE* it to another directory.
(System mark&sweep GC!)

Boiled my problem down to

(self retryWithGC: [csdir primRename: (scratch fullNameFor: 'aaa') to:
	(csdir fullNameFor: 'aaa') ]
		until: [:result | result notNil]) ~~ nil ifTrue: [self halt].

not apparently doing anything.
I also tried 
(self retryWithGC: [scratch primRename: (scratch fullNameFor: 'aaa') to:
	(csdir fullNameFor: 'aaa') ]
		until: [:result | result notNil]) ~~ nil ifTrue: [self halt].

Question is then: how to MOVE a file to a different directory?


I don't really want to copy the files, as then they look like they were all
created today (and the reappear in incremental backups and... bitch, bitch, bitch)
An adequate second place would be a copy IFF I could then set the times to be the same as the source file.

A not-satisfactory kludge is to emit a text which gets pasted into AppleScript.
I want to make it hands-off.

This is on Mac OS 9, Squeaks 2.8 & 3.2

Rik Fischer SmOOdy     riks at smoo.com
	smOOdynamics    -     Systems Made Outa Objects
		503-249-8300 ph/fx
	2400 NE 25th, Suite 800
	Portland, OR 97212
---
Don't worry that people will steal your ideas. . .
Good ideas have to be crammed down peoples' throats. . .
and even then, they might not sink in.






More information about the Squeak-dev mailing list