Re: [AD] al_make_recursive_directory

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On October 23, 2010, Peter Wang wrote:
> On 2010-10-22, Elias Pschernig <elias.pschernig@xxxxxxxxxx> wrote:
> > On Fri, 2010-10-22 at 09:32 +1100, Peter Wang wrote:
> > > Any reason not to just extend al_make_directory?
> > 
> > Hm, thinking about it, that's the most useful behavior as it's very
> > unlikely you want the function to fail if the parent doesn't exist. The
> > attached patch changes is accordingly.
> 
> There are numerous problems with the patch, which you will discover if
> you try it ;)
> 
> I assume if the path already exists and is a directory then
> al_make_directory should return true.  Also I think the behaviour
> should be pushed down to the fshook implementations.

At any rate it probably shouldn't be just a change in behavior of the existing 
function. You're just pushing around the complexity. Anyone who actually wants 
the existing functionality will have to do more work. Why not an al_make_path 
instead? And hey, one variant of each can actually take an ALLEGRO_PATH, which 
I'd find incredibly useful.

> Peter
> 
> ---------------------------------------------------------------------------
> --- Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest Create new apps & games for the Nokia N8 for consumers in  U.S.
> and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M
> in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish
> to Ovi Store http://p.sf.net/sfu/nokia-dev2dev


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/