[Mono-dev] [PATCH]System.IO.File.Replace

Bill Holmes billholmes54 at gmail.com
Wed Aug 15 18:08:21 EDT 2007

Attached is a patch that implements the 2.0 method File.IO.File.Replace.


Some implementation details are as follows.
-An internal call was added to perform this operation
-Most argument validation is performed in managed code.
-On windows we call ReplaceFile defined in Kernel32
-On !windows Replace file was implemented in io-layer/io.c

*file-io.c: Added ves_icall_System_IO_MonoIO_ReplaceFile to call
ReplaceFile Kernel32 on windows or in io-layer.
*file-io.h: Added deceleration for ves_icall_System_IO_MonoIO_ReplaceFile
*icall-def.h: Register ves_icall_System_IO_MonoIO_ReplaceFile as an
internal call.
*io.c: Added implementation for ReplaceFile.
*io.h: Added deceleration for ReplaceFile method.
*File.cs:  Add implementation for IO.File.Replace methods.
*MonoIO.cs: Declared an internal call for ReplaceFile
*FileTest.cs:  Added a test for IO.File.Replace.

This may be less of a patch request and more of a "Tell me what I did
wrong."  ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: replaceFile.diff
Type: application/octet-stream
Size: 18156 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070815/34e14df9/attachment.obj 

More information about the Mono-devel-list mailing list