On Thu, Jan 31, 2008 at 02:47:54PM +0100, Robert Krahn wrote:
Hello!
How can I delete a read-only file under windows.
FileDirectory>>deleteFileNamed: gives me a CannotDeleteFileException.
Can I force the deletion? Can I change the file properties?
Hi Robert,
Squeak tries to be very portable across operating systems, so in general it does not provide much in the way of operating system or file system functions. Changing file properties is not supported in Squeak, mainly because the concept of "file properties" means different things on different file systems and operating systems.
There are some add-on packages that can help with this sort of thing (such as FFI and OSProcess), but you can't count on these being available on all Squeak images or on all operating systems. It's probably a good idea for you to handle things like this with a Windows file browser unless there is a strong reason to do it from Squeak.
Dave