Re: Commons IO FileUtils question

2008-07-01 Thread sebb
On 30/06/2008, Niall Pemberton [EMAIL PROTECTED] wrote:
 On Mon, Jun 30, 2008 at 8:15 PM, Eric Hamacher
  [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Commons IO FileUtils question

2008-06-30 Thread Eric Hamacher
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?

 

Thanks

 

Regards,

Eric Hamacher

 

**

THIS EMAIL IS INTENDED ONLY FOR THE REVIEW OF THE ADDRESSEE(S), AND MAY
CONTAIN CONFIDENTIAL AND LEGALLY PRIVILEGED INFORMATION. INTERCEPTION,
COPYING, DISSEMINATION, OR OTHER USE BY OTHER THAN THE ADDRESSEE(S) IS
PROHIBITED AND MAY BE PENALIZED UNDER APPLICABLE PRIVACY LAWS. IF YOU
RECEIVED THIS EMAIL IN ERROR, PLEASE DELETE IT AND NOTIFY ME BY RETURN
EMAIL TO [EMAIL PROTECTED] ***

 



Re: Commons IO FileUtils question

2008-06-30 Thread Niall Pemberton
On Mon, Jun 30, 2008 at 8:15 PM, Eric Hamacher
[EMAIL PROTECTED] 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.

Niall


 Thanks



 Regards,

 Eric Hamacher

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]