unix stat command on files via FFI

David T. Lewis lewis at mail.msen.com
Thu Jan 3 13:09:43 UTC 2008

On Thu, Jan 03, 2008 at 02:29:37AM -0800, John M McIntosh wrote:
> I'm wondering if anyone has coded up the FFI for doing a unix stat  
> command? If so could they share it?

It's not FFI, but just in case you had not noticed it, you can do this:

  OSProcess accessor fileStat: '/bin/su'

The result is an array of stat() information, or an error string
derived from errno via strerror(). It's not the complete contents
of the stat structure though, see method comment of #primFileStat:
for details.

Also note that FFI is not yet working for 64bit host Linux (e.g.
Linux on AMD 64). Does it work on OS X?


More information about the Squeak-dev mailing list