Hi Mariano,
It is supported directly in OSProcess. See the unit test for examples.
Dave
Sorry, I should have been more clear about this. The classes in the OSProcess package are OSFileLock and OSFileRegionLock, as well as the methods in category 'file locking' of class UnixOSProcessAccessor. You can look at the unit tests to see how these are used, but you will not be able to actually run any of the tests that depend on #forkSqueak because these rely on a feature not present in Cog. So look at the tests as examples, but do not expect them to run. The actual file locking support should work fine on Pharo (but let me know if that is not true). HTH, Dave
Hi guys,
Do we have a method to lock a file at the OS level? I searched in image but I cannot find anything. If it would work in gemstone too that would be nice.
Thanks!
-- Mariano http://marianopeck.wordpress.com