Explorer does support a file beginning with a ".", because there are some Unix files that I have downloaded and it starts with ".", and Explorer reads it fine, the problem is there seems to be an method in Explorer that specifically doesn't allow it starting with a "." when creating the file.
Also I didn't know about that AltPath Property. Either way I think that all majic numbers or strings should be eliminated in most cases, that is why I always use String.Empty, Environment.NewLine, and String.Concat(...). So just practice good coding and you shouldn't run into any problems. Also don't you think if the Win32 API supports either slash that mono should do the same, so that it mimics the real .Net as much as possible? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Gilbert Sent: Tuesday, March 09, 2004 12:58 AM To: [EMAIL PROTECTED] Subject: RE: [Mono-list] Platform comparison Actually, as I understand it, it doesn't do any transformation. It passes /'s to the underlying filesystem API, because it is supported there. Yes, the Win32 API *does* support '/' as a path separator character (Explorer's support for this is sketchy, though; Explorer has other problems as well, such as not allowing you to rename a file so that it begins with a dot). Note also that even in Windows, the framework has System.IO.Path.AltDirectorySeparatorChar == '/'. I haven't investigate it, but the framework documentation implies that Rotor sets this to "\\", despite the fact that, to the best of my knowledge, "\\" is not supported on Unix as it is a valid character within a pathname component! I quote from the AltDirectorySeparatorChar MSDN article: The character stored in this field cannot be in InvalidPathChars. This field can be set to the same value as DirectorySeparatorChar. AltDirectorySeparatorChar and DirectorySeparatorChar are both valid for separating directory levels in a path string. The value of this field is a backslash ('\') on Unix, and a slash ('/') on Windows and Macintosh operating systems. Jonathan At 10:12 AM 08/03/2004 -0500, you wrote: >Hi everybody I just wanted to weigh in on this subject. I have found that >in the MS .Net framework, it usually doesn't matter what slash character you >use, because the framework converts it. Such as if you are in a HTTP URL >the framework converts "\" to "/". And if you are working with an IO >namespace then it converts "/" to "\". I don't know if Mono does this, >because I am just starting to use Mono, but there should be some >normalization in the framework so the programmer doesn't constantly have to >check these kinds of things IMHO. > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] On Behalf Of Rodolfo Campero >Sent: Monday, March 08, 2004 10:00 AM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: [Mono-list] Platform comparison > >Hi Jochen, >Instead of hard-coding the separator char, you can use >System.IO.Path.DirectorySeparatorChar. >I don't know any guideline, but in general if you are about to do something >that you think is not platform-independent, search a bit because is almost >sure that there is a platform-independent way to do it. >Regards, >Rodolfo > > >>From: "Jochen Wezel" <[EMAIL PROTECTED]> >>To: <[EMAIL PROTECTED]> >>Subject: [Mono-list] Platform comparison >>Date: Mon, 8 Mar 2004 14:37:41 +0100 >> >>Hello together! >> >>Is there a comparison or guideline for the several platforms regarding >>what we developers have to pay attention to? >>For example, Linux uses "/" as directory separator char, Windows uses >>"\", but what about Mac OS (X)? >> >>Or maybe there are other points which are good to know? >> >>Jochen >>_______________________________________________ >>Mono-list maillist - [EMAIL PROTECTED] >>http://lists.ximian.com/mailman/listinfo/mono-list > >_________________________________________________________________ >Add photos to your e-mail with MSN 8. Get 2 months FREE*. >http://join.msn.com/?page=features/featuredemail > >_______________________________________________ >Mono-list maillist - [EMAIL PROTECTED] >http://lists.ximian.com/mailman/listinfo/mono-list > >_______________________________________________ >Mono-list maillist - [EMAIL PROTECTED] >http://lists.ximian.com/mailman/listinfo/mono-list > > _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list