For os-x carbon we attempted to implement the filecopy plugin many years back but had serious issues with Apple's failure to provide an operating system api that let you copy a file between locations and actually preserve all the meta-data for the file, date/time, permissions, ACL, os-9 attributes, endless list. Plus rules were slightly different when dealing with AppleShare Servers, and then basically gave it up as a lost cause.
However I guess I'll consider revisiting this because Apple has provide an API to move objects in a file system in 10.4 or later. We actually use this via FFI in Sophie to import data into Sophie, and to copy data between books on Save As operation. For example it preserves the OS-9 file type which indicates the file 'Foo' is a MPEG movie without having to say the file is 'Foo.mpeg' Then later when we hand 'Foo' to some audio/video apis they know what to do by reading the ancient OS-9 file type.
On Nov 18, 2007, at 4:18 PM, David T. Lewis wrote:
This is a set of support code patches that make FileCopyPlugin work on 32/64 bit images and 32/64 bit unix VMs, plus a unit test for verification.
FileCopyPluginTest-dtl.cs provides a unit test to verify operation of the FileCopyPlugin. Interestingly, the FileCopyPlugin has never worked correctly on Unix because it answered a primitiveFail after a successful copy operation. That means that the primitive code was doing the copy, and the fallback code would re-do it afterward.
The support code changes are in the following files:
For all platforms (unix and Mac OS are impacted): platforms/Cross/plugins/FileCopyPlugin/FileCopyPlugin.h
For Unix: platforms/unix/plugins/FileCopyPlugin/sqUnixFileCopyPlugin.c platforms/unix/vm/sqUnixCharConv.c platforms/unix/vm/sqPlatformSpecific.h
Mac OS platform code will need an update also, but I did not try
to do this (it should be simple, but I cannot test the result).
- Win32 and RiscOS do not appear to be impacted.
Dave
<FileCopyPluginTest-dtl.2.cs><Cross-plugins-FileCopyPlugin- FileCopyPlugin.h.diff><unix-plugins-FileCopyPlugin- sqUnixFileCopyPlugin.c.diff><unix-vm-sqPlatformSpecific.h.diff><unix- vm-sqUnixCharConv.c.diff>
-- = = = ======================================================================== John M. McIntosh johnmci@smalltalkconsulting.com Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ========================================================================