[Mono-devel-list] filenames prefixed with dot are not collected by Directory.GetFiles ()

md at mt.web.id md at mt.web.id
Mon May 26 01:06:26 EDT 2003


Filenames prefixed with dot (eg. .qmail, .config, etc) are not 
collected by
Directory.GetFiles (); (sample code attached)

I've checked on mcs/corlib/System/System.IO/Directory.cs and it points 
to internal call in
mono/mono/io-layer/io.c, so I think this is Mono's problem.

however it works on windows:
C:\mdamt>mono test.exe
./.test.txt
./.test2.txt
./.testing2.txt
                                                                           
C:\mdamt>test
./.test.txt
./.test2.txt
./.testing2.txt

Mohammad DAMT <mdamt at bisnisweb.com>
-------------- next part --------------
using System;
using System.IO;

namespace Test {
	public class Test {
	 	static void Main () {
	 		string [] files = Directory.GetFiles ("./", ".*");
			for (int i = 0; i < files.Length; i ++) {
	 			Console.WriteLine ("{0}", files[i]);
			}
		}
	}
}


More information about the Mono-devel-list mailing list