[Vm-dev] Re: [Pharo-dev] A primitive to create a temporary directory?

David T. Lewis lewis at mail.msen.com
Tue Jun 4 03:32:17 UTC 2013

On Thu, May 30, 2013 at 08:52:37PM +0200, Igor Stasenko wrote:
> On 29 May 2013 15:04, Damien Cassou <damien.cassou at gmail.com> wrote:
> > Hi,
> >
> > is there a primitive to create a temporary directory without any race
> > condition issue?
> >
> i don't think so


I added the primitives to OSProcessPlugin and OSProcess. OSProcess support code
is in the latest OSProcess on SqueakSource:

 	UnixOSProcessAccessor>>mktemp: templateString
	UnixOSProcessAccessor>>mksemp: templateString
	UnixOSProcessAccessor>>mkdtemp: templateString

To make a temporary directory without any race condition issue:

	"OSProcess accessor mkdtemp: 'foodir.XXXXXX' "


The primitives are in SqueakSource VMConstruction-Plugins-OSProcessPlugin-dtl.38.
You can use this with Cog (I try to keep up to date with Eliot's changes).



More information about the Vm-dev mailing list