[Mono-dev] FileInfo Replace

Max de Lavenne max at tfbc.com
Tue May 5 17:04:45 EDT 2009


Ask the other guys on the list. I think it should.
 
I looked at your patch because my company has a mono application that relies
heavily on the filesystem, and we had to implement a similar version of
FileInfo.Replace, without realizing it was part of the framework. 

  _____  

From: David Uvalle [mailto:david.uvalle at gmail.com] 
Sent: Tuesday, May 05, 2009 8:13 AM
To: Max de Lavenne
Cc: mono-devel-list
Subject: Re: [Mono-dev] FileInfo Replace


Thanks, can this be committed?


On Mon, May 4, 2009 at 2:36 PM, Max de Lavenne <max at tfbc.com> wrote:


Nice, looking good.. 

  _____  

From: David Uvalle [mailto:david.uvalle at gmail.com] 
Sent: Monday, May 04, 2009 2:27 PM
To: Max de Lavenne
Cc: mono-devel-list
Subject: Re: [Mono-dev] FileInfo Replace



Ok this check first the read-only flag and sends and exception if the
destinationFileName is has it.


On Sat, May 2, 2009 at 12:59 PM, David Uvalle <david.uvalle at gmail.com>
wrote:



On Fri, May 1, 2009 at 5:18 PM, Max de Lavenne <max at tfbc.com> wrote:


Nice,
 
But... you need to also check for the read-only flag of the
destinationFileName before copying. Especially important for Linux systems
where IsReadOnly isn't the only parameter to check


What are the others? e.g. that the destinationFileName is in a path where a
user don't have permission to write?
 


 
Quote from MSDN "This method will succeed in Windows 2000 environments if
the destFileName is read-only and will not raise an exception. Use the
IsReadOnly property to check if the destination file is read-only before
attempting to replace it."
 
You should implement that.


Sure I will.

Thanks for your feedback.

 



  _____  

From: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of David Uvalle
Sent: Friday, May 01, 2009 3:10 PM
To: mono-devel-list
Subject: [Mono-dev] FileInfo Replace


FileInfo Replace method and some tests.





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090505/0ca9fc22/attachment.html 


More information about the Mono-devel-list mailing list