[Mono-devel-list] GetFolderPath: Should it create the directories it returns?
spouliot at videotron.ca
Sun Apr 25 20:58:11 EDT 2004
> What does the MS equiv do?
Microsoft implementation doesn't create the directories.
That's why the current code doesn't create them either ;-)
> That's exactly the kind of routine that could break a LOT of
> apps (or at least make them behave in unexpected ways)
Agreed. This is why I think this is a case where 100% compatibility may be
more a problem than a solution.
Why ? Because (most versions of) Windows already have (most of) the
directories created (and they are kind of hard to remove).
Sadly this means that most existing user code doesn't check for a directory
existance before using it. So we may end up breaking things (not fixing
them) by being compatible.
>>The check for the directory should only be done
>>once per kind of directory, and not on every invocation.
This may also be a problem.
Long-lived (e.g. iFolder) applications may create a path (using
GetFolderPath(...) as their base) and use this path several times (possibly
during several days). Another application (mono-based or not) could move or
delete the directory during this time.
And no Windows doesn't really "suffer" from the same problem. This is
because most of those directories are "hard" to delete on Windows (e.g.
Explorer track them when you move them) and once deleted they don't come
back easily either.
From: mono-devel-list-admin at lists.ximian.com
[mailto:mono-devel-list-admin at lists.ximian.com]On Behalf Of Simon Dawson
Sent: 25 avril 2004 18:04
To: Miguel de Icaza
Cc: mono-devel-list at ximian.com
Subject: Re: [Mono-devel-list] GetFolderPath: Should it create the
directories it returns?
What does the MS equiv do?
That's exactly the kind of routine that could break a LOT of
apps (or at least make them behave in unexpected ways)
At 09:52 26/04/2004, you wrote:
> I think that GetFolderPath should create the directories it returns
>if they do not exists. The check for the directory should only be done
>once per kind of directory, and not on every invocation.
>Mono-devel-list mailing list
>Mono-devel-list at lists.ximian.com
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list