FileDirectory question- How do you move a file/folder?

Ned Konz ned at bike-nomad.com
Fri May 16 21:50:03 UTC 2003


On Friday 16 May 2003 01:24 pm, Anthony Adachi wrote:

> FileDirectory has delete and create methods but it
> doesn't appear to have any move methods. How does one
> move a file or folder/directory from within Squeak?

FileDirectory>>rename:toBe: might work; have you tried it?

There are many more (platform-specific) subtleties to the general 
"move" idea that I'm sure aren't covered by Squeak: for instance, on 
many systems you can't actually move a file between two different 
file systems. So you have to copy it then delete it (we also have a 
FileCopyPlugin).

And what happens when you try to move a file to a file system with 
different naming rules?

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list