[Mono-dev] [PATCH] MS.NET compatible Path.GetTempFileName

Kornél Pál kornelpal at hotmail.com
Fri Jan 6 12:19:02 EST 2006


MS.NET uses Windows API GetTempFileName function for Path.GetTempFileName.
If we want full compatibility we should implement it in the I/O layer using
a global unsigned 16-bit counter that starts from zero and is incremented
without overflow check each time GetTempFileName is called.

Altough a managed implementation can be as good as a native one I think the
file name pattern should be the same. The attached patch modifies the
pattern to "tmp<UUUU>.tmp" that is the same used by MS.NET. (There is no
zero padding in <UUUU>.)

Please review and approve the patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TempFileName.diff
Type: application/octet-stream
Size: 849 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060106/a24fc78e/attachment-0001.obj 

More information about the Mono-devel-list mailing list