[jcifs] Copying Files
Rob Wygand
rob at filefish.com
Thu Aug 16 08:24:39 EST 2001
Chris,
I guess I wasn't clear enough... I understand that if I am copying
across machines that, yes, the network needs to be the bridge. I was
actually only talking about copying within a share. As an example,
say that //foo/bar is a machine and I want to copy everything in
//foo/bar/stuff/rob to //foo/bar/otherstuff/misc.
I'll talk a look at SMB_COM_COPY...
rjw
Christopher R. Hertel wrote:
> On Wed, Aug 15, 2001 at 03:03:40PM -0700, Rob Wygand wrote:
>
>>Hello all,
>>
>>Am I right in deducing that the only way to copy a file on a CIFS share
>>when using JCIFS is to open two SMBI/OStream's and copy the file byte by
>>byte from location a to location b?
>>
>
> If you are copying from one share to another share, yes. If you are
> copying to a local file, then you should only need the one share.
>
>
>>Does this mean that whenever I do such a copy that every byte of file a
>>is schlepped across to my machine then schlepped back to the remote
>>machine in the new location?
>>
>
> How else would you expect this to work? If you wanted to copy a file from
> machine A to machine B you would need a direct connection between A and
> B. If you are on machine C, then the only way to establish a direct
> connection between A and B is to somehow force one of those machines to
> open such a connection with the other.
>
> On a Unix system, you could log on to machine A, and then open the
> connection directly to machine B. If you can't do that (or equivalent)
> then you need to pass the packets through machine C. A good reason to
> have full-duplex on your etherswitch.
>
> Chris -)-----
>
>
More information about the jcifs
mailing list