[squeak-dev] Copying a file from Squeak on Linux

David T. Lewis lewis at mail.msen.com
Mon Mar 3 02:37:13 UTC 2008


On Sun, Mar 02, 2008 at 05:49:54PM -0500, Bill Schwab wrote:
> 
> The copy plugin appears not to be in my VM.  To be safe though, how
> would I test that?  So far, all I have found is to call a function in
> the plugin, which could fail for various reasons besides the code not
> being present.

Bill,

If you call the file copy primitive, it will try to load the plugin.
The #listLoadedModules method will show you the loaded plugins, hence:

  FileList new primitiveCopyFileNamed: 'foo' to: 'bar'.
  SmalltalkImage current listLoadedModules
      detect: [:plugin | 'FileCopyPlugin*' match: plugin]
      ifNone: ['the FileCopyPlugin is not installed']

Dave
 



More information about the Squeak-dev mailing list