Set a files timestamp or copy a file with identical date

Tim Rowledge tim at rowledge.org
Tue May 10 19:22:33 UTC 2005


Herbert König <herbertkoenig at gmx.net> wrote:


> TR> For usage, scan the VMMaker code for
> TR> VMMaker>primitiveCopyFileNamed:to: for
> TR> example.
> 
> I've understood that I need to find the (slang? C?) code for the
> primitive, so where can that be found?
The function you need is in a vm plugin, so code for it will exist in two
places[*].
a) the Slang code that is part of the VMMaker package. In particular, look for
the FileCopyPlugin class. Note that it seems incomplete, but see also...
b) the platforms tree as downloaded from the SVN server, in particular the
platforms/{yourplatform}/plugins/FileCopyPlugin

Now, as we've mentioned it won't be there for windows yet, so you'd have to
read the other platform implementations to get the idea. All you need to do is
implement sqInt sqCopyFilesizetosize(char *srcName, sqInt srcNameSize, char
*dstName, sqInt dstNameSize) and build the plugin.

This _ought_ to be doable by reading the relevant swiki pages so please try it
that way and please make notes about what isn't explained etc so we can improve
the doc. Only by outside reviewers providing feedback can it get better.

> I've read the VMMAKER article on the swiki and for now I fear that
> would be the only way to go?
Why the fear? VMMaker is incredibly simple to use; load it from SqueakMap,
worldmenu>open>vmmaker, press a button.  All I could do to make it simpler
would be to pre-press the button for you ;-)

[*] there are a few plugins whose code is not in the VMMaker package. Nothing
to worry about right now.

tim
--
Tim Rowledge, tim at rowledge.org, http://www.rowledge.org/tim
Useful random insult:- Nine pence in the shilling.



More information about the Squeak-dev mailing list