[Mono-list] DirectoryInfo.GetFiles() bug?

Atsushi Eno atsushi at ximian.com
Thu Jan 24 03:24:52 EST 2008


Hello,

I rather support Chris that it should be covered by MONO_IOMAP.
I couldn't find the precise description that *.* should work like
that on MSDN, but if it exists, it would actually explain that
Directory.GetFiles() just reuses Win32 IO function that treats *.*
as to pick every file up.

If your explanation is regarded as correct, then the "path" argument
must be treated as case insensitive. Read "Remarks" section:

	The path parameter is not case-sensitive.

which does not apply to mono.

Atsushi Eno


Robert Jordan wrote:
> Chris Howie wrote:
>> On Jan 23, 2008 1:45 PM, Jonathan Pryor <jonpryor at vt.edu> wrote:
>>> On Wed, 2008-01-23 at 18:17 +0000, Alan McGovern wrote:
>>>> Are you sure that's a bug? '*.*' will look for every file which
>>>> contains a '.' character in it. If you want all files, you should just
>>>> use ' * ', or leave out the mask altogether.
>>> On Windows, '*.*' means *all* files, even those without a '.':
>>>
>>>   http://blogs.msdn.com/oldnewthing/archive/2007/12/17/6785519.aspx
>>>
>>> So how close do we want to get to Win32 semantics? :-)
>> Maybe it could be tied in some way to MONO_IOMAP or
>> MONO_STRICT_IO_EMULATION so that people using broken OSes can switch
>> on the behavior they need, and the rest of us get the right behavior
>> by default.  :)
> 
> There is no need to raise the broken OS flag as the behavior
> of Directory.GetFiles ("*.*") is clearly documented in MSDN.
> 
> Feel free to use Mono.Unix/Posix instead ;-)
> 
> Robert
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 



More information about the Mono-list mailing list