You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by sebb <se...@gmail.com> on 2008/07/01 14:57:05 UTC

Re: Commons IO FileUtils question

On 30/06/2008, Niall Pemberton <ni...@gmail.com> wrote:
> On Mon, Jun 30, 2008 at 8:15 PM, Eric Hamacher
>  <er...@enetrix.com> wrote:
>  > Hello:
>  >
>  > I took a file on my filesystem, copied and renamed it.  I took the two
>  > files and compared them using FileUtils.contentEquals(File, File).  In
>  > this case, shouldn't the method return true?  If not, when would it
>  > return true?
>
>
> Yes it should return true. Can you use a debugger to find out which
>  line in FileUtils is returning false? Also best to say which version
>  of Commons IO you are using.
>

Just a thought: if you are using a Windows file system, the copy
command can sometimes change the file, e.g. if there is an EOF (^Z)
character in the file, then copy /a will stop copying after the EOF
character.

This will show up as different file lengths.

>  Niall
>
>  >
>  > Thanks
>  >
>  >
>  >
>  > Regards,
>  >
>  > Eric Hamacher
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


RE: Commons IO FileUtils question

Posted by Eric Hamacher <er...@enetrix.com>.
Everything is working fine now.  Don't know what was going on before.
Thanks for all the feedback!

Eric

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Tuesday, July 01, 2008 7:57 AM
To: Commons Users List
Subject: Re: Commons IO FileUtils question

On 30/06/2008, Niall Pemberton <ni...@gmail.com> wrote:
> On Mon, Jun 30, 2008 at 8:15 PM, Eric Hamacher
>  <er...@enetrix.com> wrote:
>  > Hello:
>  >
>  > I took a file on my filesystem, copied and renamed it.  I took the
two
>  > files and compared them using FileUtils.contentEquals(File, File).
In
>  > this case, shouldn't the method return true?  If not, when would it
>  > return true?
>
>
> Yes it should return true. Can you use a debugger to find out which
>  line in FileUtils is returning false? Also best to say which version
>  of Commons IO you are using.
>

Just a thought: if you are using a Windows file system, the copy
command can sometimes change the file, e.g. if there is an EOF (^Z)
character in the file, then copy /a will stop copying after the EOF
character.

This will show up as different file lengths.

>  Niall
>
>  >
>  > Thanks
>  >
>  >
>  >
>  > Regards,
>  >
>  > Eric Hamacher
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>  For additional commands, e-mail: user-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org