[jcifs] Copying Files

Christopher R. Hertel crh at ubiqx.mn.org
Thu Aug 16 08:14:45 EST 2001


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 -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org




More information about the jcifs mailing list