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

Tim Rowledge tim at sumeru.stanford.edu
Fri May 16 22:05:30 UTC 2003


> FileDirectory>>rename:toBe: might work; have you tried it?
This is ok so long as you want to leave it in the same directory.

>
> 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?
>
FileCopyPlugin gets past this irritation by taking a pair of strings 
and using OS calls in the plugin to copy the file named by one string 
to the other string; using the OS allows us to keep any file properties 
that are not noted by current Squeak code (on Acorns I lose filetype 
info without FileCopyPlugin) and potentially to handle the different 
naming rules. It's all just another reason to get any and all file 
related fixes in the system asap.

tim
-- 
tim at sumeru.stanford.edu



More information about the Squeak-dev mailing list