[Pharo-project] Rio: binary mode copy not keep
Hello, I try to use Directory addTree: The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file. I try to add binary mode : base binary addTree: dest but it is the same result: input error. When I copy this file directly with binary mode, it is ok. addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ? Directory home binary files first isBinary ==> false ! Should it be true ? Is there another, 'official', way to binary recursive copy ? I use Pharo on Windows plateform. a+ Vicnet -- View this message in context: http://n2.nabble.com/Rio-binary-mode-copy-not-keep-tp3571512p3571512.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
May be keith will reply to you. For 1.1 I really want to kick FileDirectory crap out. I'm tired about it. Stef On Sep 3, 2009, at 8:52 AM, Vicnet wrote:
Hello,
I try to use Directory addTree:
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file.
I try to add binary mode :
base binary addTree: dest
but it is the same result: input error.
When I copy this file directly with binary mode, it is ok.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ?
Directory home binary files first isBinary ==> false !
Should it be true ?
Is there another, 'official', way to binary recursive copy ?
I use Pharo on Windows plateform.
a+ Vicnet -- View this message in context: http://n2.nabble.com/Rio-binary-mode-copy-not-keep-tp3571512p3571512.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Vicnet wrote:
Hello,
I try to use Directory addTree:
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file.
an input what?
I try to add binary mode :
base binary addTree: dest
but it is the same result: input error.
When I copy this file directly with binary mode, it is ok.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ?
Directory home binary files first isBinary ==> false !
Should it be true ?
the #copyTo: uses binary by default. However copyLocalFile:toLocalFile: chooses from a variety of copying methods I understand that there is a bug here, but I am not really sure what the problem is with the jpeg file. Keith
Is there another, 'official', way to binary recursive copy ?
I use Pharo on Windows plateform.
a+ Vicnet
Hello, Keith Hodges a écrit :
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file. an input what?
UTF8TextConverter(Object)>>error:'Invalid utf8 input detected' In fact, there is nothing to deal with FileJpeg, File make the same error on my image (Exupery with Pharo on Windows).
I try to add binary mode : base binary addTree: dest.
Files from base are not copy in binary mode.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ? Directory home binary files first isBinary ==> false ! Should it be true ?
copyLocalFile:toLocalFile: chooses from a variety of copying methods I understand that there is a bug here
Not sure that the pb is here. I think it is in #entries (or #files,...) method that collect files from source dir without reporting binary mode from parent. Peharps, #select: should do the job ?
but I am not really sure what the problem is with the jpeg file.
Rigth, the pb is not with jpeg but with copy mode that not transmit. However, here is a suggestion: FileKernel>>entries is defined as self select: [:e | true ] a block that only return true is strnage for me. Why not #contentsIn: in executive that return all entries (like contents in Collection) ? a+ Vicnet
Vicnet wrote:
Hello,
Keith Hodges a écrit :
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file.
an input what?
UTF8TextConverter(Object)>>error:'Invalid utf8 input detected'
In fact, there is nothing to deal with FileJpeg, File make the same error on my image (Exupery with Pharo on Windows).
I try to add binary mode : base binary addTree: dest.
Files from base are not copy in binary mode.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ? Directory home binary files first isBinary ==> false ! Should it be true ?
copyLocalFile:toLocalFile: chooses from a variety of copying methods I understand that there is a bug here
Not sure that the pb
What the heck is pb?
is here.
I think it is in #entries (or #files,...) method that collect files from source dir without reporting binary mode from parent. Peharps, #select: should do the job ?
but I am not really sure what the problem is with the jpeg file.
Rigth, the pb is not with jpeg but with copy mode that not transmit.
However, here is a suggestion: FileKernel>>entries is defined as self select: [:e | true ] a block that only return true is strnage for me. Why not #contentsIn: in executive that return all entries (like contents in Collection) ?
Because #select: already does everything you need in an elegant manner. The squeak wiki Rio page documents this
a+ Vicnet
Sorry but I dont understand most of your email. All file copies are in binary mode by default, so there should be no need to copy the binary flag. Keith
FWIW, I recently had a very similar problem bite me, and had to set the binary mode to fix it. I _thought_ I had tested the offending code, and maybe I did?? I am still on web 09.07.2; the code has been with me since 6-08, and I noted the failure last month. Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Keith Hodges Sent: Thursday, September 03, 2009 4:31 PM To: Pharo-project@lists.gforge.inria.fr Subject: Re: [Pharo-project] [Bulk] Re: Rio: binary mode copy not keep Vicnet wrote:
Hello,
Keith Hodges a écrit :
The src directory I use containts jpeg file. addTree fails because FileKernel use a FileJpeg in InputStream and there is a input pb on this file.
an input what?
UTF8TextConverter(Object)>>error:'Invalid utf8 input detected'
In fact, there is nothing to deal with FileJpeg, File make the same error on my image (Exupery with Pharo on Windows).
I try to add binary mode : base binary addTree: dest.
Files from base are not copy in binary mode.
addTree collect files/dirs to copy but dot not transmit the binary flag. Is it normal ? Directory home binary files first isBinary ==> false ! Should it be true ?
copyLocalFile:toLocalFile: chooses from a variety of copying methods I understand that there is a bug here
Not sure that the pb
What the heck is pb?
is here.
I think it is in #entries (or #files,...) method that collect files from source dir without reporting binary mode from parent. Peharps, #select: should do the job ?
but I am not really sure what the problem is with the jpeg file.
Rigth, the pb is not with jpeg but with copy mode that not transmit.
However, here is a suggestion: FileKernel>>entries is defined as self select: [:e | true ] a block that only return true is strnage for me. Why not #contentsIn: in executive that return all entries (like contents in Collection) ?
Because #select: already does everything you need in an elegant manner. The squeak wiki Rio page documents this
a+ Vicnet
Sorry but I dont understand most of your email. All file copies are in binary mode by default, so there should be no need to copy the binary flag. Keith _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Helllo,
Sorry but I dont understand most of your email.
Ok, I resume There are 2 independant pbs: 1) when use Directory>>addTree, I've got: UTF8TextConverter(Object)>>error:'Invalid utf8 input detected' on stream reading 2) "Directory home binary files first isBinary" return false I think it should return true because base dir is binary. For the suggestion on FileKernel>>entries, it think, IMHO, that self select: [:e | true ] is not so elegant (even Collection have a #contents method, which return self in fact :-) ) But it's not important... just a thought. a+ Vicnet -- View this message in context: http://n2.nabble.com/Rio-binary-mode-copy-not-keep-tp3571512p3578246.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
El vie, 04-09-2009 a las 03:22 -0500, Vicnet escribió:
Helllo,
Sorry but I dont understand most of your email.
Ok, I resume
There are 2 independant pbs:
Keith has already asked what is a pb. I suppose that means "problem" in a very cell-phone-sms-message slang.
1) when use Directory>>addTree, I've got: UTF8TextConverter(Object)>>error:'Invalid utf8 input detected' on stream reading
2) "Directory home binary files first isBinary" return false I think it should return true because base dir is binary.
For the suggestion on FileKernel>>entries, it think, IMHO, that self select: [:e | true ] is not so elegant (even Collection have a #contents method, which return self in fact :-) ) But it's not important... just a thought.
a+ Vicnet
-- Miguel Cobá http://miguel.leugim.com.mx
Heelo, Miguel Enrique Cobá Martinez (via Nabble) a écrit :
There are 2 independant pbs: Keith has already asked what is a pb. I suppose that means "problem" in a very cell-phone-sms-message slang.
Ooooppps. I don't understand his question ! I just realize my mistake now !!! Yes, you're rigth. pb is problem for me. Excuse-me for this shortcut. I never use slang or phone langage, just one or two terms and this is one of them ! sorry. a+ Vicnet -- View this message in context: http://n2.nabble.com/Rio-binary-mode-copy-not-keep-tp3571512p3581275.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Hello,
"Directory home binary files first isBinary" return false I think it should return true because base dir is binary.
Is my assertion ok ? If Directory is in binary mode, should #files return File in binary mode too ? a+ Vicnet -- View this message in context: http://n2.nabble.com/Rio-binary-mode-copy-not-keep-tp3571512p3624825.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (5)
-
Keith Hodges -
Miguel Enrique Cobá Martinez -
Schwab,Wilhelm K -
Stéphane Ducasse -
Vicnet