commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carman" <ja...@carmanconsulting.com>
Subject Re: VFS copyFrom() Does Not Include Source in Directory Copy
Date Tue, 11 Sep 2007 19:32:12 GMT
I don't think this is a bug.  The c:\out directory now contains the
same contents that the c:\in directory contained.  Therefore, c:\out
is a copy of c:\in.  The copyFrom method doesn't copy the source file
into the destination file.  It makes the destination file a copy of
the source file.

On 9/11/07, richard head <dutone@hotmail.com> wrote:
> In the javadocs for copyFrom() it says: "Copies another file, and all its
> descendents, to this file..."
> This "another file"- the srcFile argument- should then be copied correct?
>
> $ ls /cygdrive/c/in/
> New Text Document.txt
>
> $ ls /cygdrive/c/out/
>
> Code:
>
> //...
> FileObject destFile = manager.resolveFile("C:\\out");
> FileObject srcFile = manager.resolveFile("C:\\in");
>
> destFile.copyFrom(srcFile,Selectors.SELECT_ALL);
>
>
> $ java Bs
>
> $ ls /cygdrive/c/out/
> New Text Document.txt
>
> As you can see, in is not a subdirectory of out. Are the docs wrong, or is
> this a bug?
>
> Thanks.
>
> _________________________________________________________________
> Gear up for Halo(r) 3 with free downloads and an exclusive offer.
> http://gethalo3gear.com?ocid=SeptemberWLHalo3_MSNHMTxt_1
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message