On Sun, Feb 03, 2013 at 06:42:55PM +1100, richo wrote:
3) expose a new function that raises errors if the directory exists so that
an atomic mkdir is available. My thought is to just name it mkdir, but I'm
not sure where it belongs.
Please don't do that. This sort of design leads to
On 03/02/13 11:42 +0100, Peter Bex wrote:
On Sun, Feb 03, 2013 at 06:42:55PM +1100, richo wrote:
3) expose a new function that raises errors if the directory exists so that
an atomic mkdir is available. My thought is to just name it mkdir, but I'm
not sure where it belongs.
Please don't do
Peter Bex scripsit:
Better to either keep it the way it is, change the semantics and
breaking compat (so be it), or convert to keyword args and make it an
optional feature (my least favorite alternative).
I'm not a big fan of keyword args either, but an optional second argument
that makes it
On Sun, Feb 03, 2013 at 10:22:45AM -0500, John Cowan wrote:
Peter Bex scripsit:
Better to either keep it the way it is, change the semantics and
breaking compat (so be it), or convert to keyword args and make it an
optional feature (my least favorite alternative).
I'm not a big fan of
Peter Bex scripsit:
This optional parameter tells it to create parent directories if they
don't exist. Of course we could make it look like:
(create-directory pathname [ parents? [ atomic? ] ] )
This is probably the cleanest backwards-compatible solution.
+1
--
John Cowan
Well, there is another option, which is to put an atomic
implementation in, say, the posix-extras egg, and then the
user may import it under a different name or overwrite
posix's create-directory with it.
On Feb 3, 2013, at 9:26 AM, Peter Bex wrote:
On Sun, Feb 03, 2013 at 10:22:45AM -0500,
From: John Cowan co...@mercury.ccil.org
Subject: Re: [Chicken-users] [patch] remove the initial check on directory
existance
Date: Sun, 3 Feb 2013 10:22:45 -0500
Peter Bex scripsit:
Better to either keep it the way it is, change the semantics and
breaking compat (so be it), or convert
From: Peter Bex peter@xs4all.nl
Subject: Re: [Chicken-users] [patch] remove the initial check on directory
existance
Date: Sun, 3 Feb 2013 16:26:28 +0100
On Sun, Feb 03, 2013 at 10:22:45AM -0500, John Cowan wrote:
Peter Bex scripsit:
Better to either keep it the way it is, change
This patch removes the internal check for directory existance in
create-directory, meaning that it can be treated as atomic on platforms where
mkdir(2) is.
--
richo || Today's excuse:
IRQ dropout
http://blog.psych0tik.net
From 3e1d5c55b3673403a8a1a69638ffe7083c09967c Mon Sep 17 00:00:00 2001
On Sun, Feb 03, 2013 at 02:20:59AM +1100, richo wrote:
This patch removes the internal check for directory existance in
create-directory, meaning that it can be treated as atomic on platforms
where mkdir(2) is.
This makes it inconsistent with the documentation (which, iiuc is already
the case
Hi,
On Sat, 2 Feb 2013 16:54:19 +0100 Peter Bex peter@xs4all.nl wrote:
On Sun, Feb 03, 2013 at 02:20:59AM +1100, richo wrote:
This patch removes the internal check for directory existance in
create-directory, meaning that it can be treated as atomic on platforms
where mkdir(2) is.
I am positive this is a case where the documentation was written
to explain an implementation artifact. That note wasn't added
until 11 months ago ... by Mario.
The current implementation returns foo if a file foo
(not just a directory foo) already exists. No one is
ever going to check this
12 matches
Mail list logo