[Mono-devel-list] Re: [Mono-patches] r36430 - trunk/mcs/class/System.Web
John Luke
john.luke at gmail.com
Tue Nov 23 15:03:42 EST 2004
On Tue, 2004-11-23 at 14:40 -0500, Jonathan Gilbert wrote:
> At 08:05 AM 23/11/2004 -0500, Ben Maurer wrote:
> >> Ben hi.
> >>
> >> Have you tested this to see if it wioll break the Win build?
> >>
> >> I use both win and Linux and always use / as a path seperator, to keep
> >> things simple for my own little mind. The only times I have troubles is
> >> with relative paths, when I am going down the tree. On these occassions
> >> I need to add the drive as well.
> >>
> >> The following code works fine in Win
> >>
> >> System.IO.FileInfo mapFile = new
> >> System.IO.FileInfo("C:/temp/simon.xml"); System.IO.StreamReader reader =
> >> mapFile.OpenText();
> >> string strText = reader.ReadToEnd();
> >> reader.Close();
> >> textBox1.Text = strText;
> >>
> >> Also
> >> System.IO.FileInfo mapFile = new
> >> System.IO.FileInfo("myFolder/simon.xml"); works going up the tree. From
> >> the application directory (bin)
> >
> >That is because Path.GetFullPath will change to the correct path
> >component. System.IO stuff calls that method, so it will get fixed.
> >
> >I guess since we are using MCS it would get fixed. However, for stuff like
> >the make deps, this will not help.
>
> Actually, forward slashes work at the OS level. The win32 API CreateFile
> can be called with forward slashes. CSC references with '/' work just fine
> (I actually tested).
>
csc in cygwin will fail, if I remember correctly.
More information about the Mono-devel-list
mailing list