[jcifs] Copy SmbFile to local File ?
Michael B Allen
miallen at ioplex.com
Thu Mar 6 16:24:24 GMT 2008
On Thu, 6 Mar 2008 11:39:31 +0100
"contra1984 contra1984" <contra1984 at googlemail.com> wrote:
> Hi,
>
> I really love the jcifs project but right now I'm stuck.
> I'd like to copy a SmbFile to a local File on my harddrive. I was surprised
> that jcifs doesn't have such a function built in because copying files from
> and to harddrive is very common.
>
> How can I copy a SmbFile to a local File? I'd like to stay plattform
> independent so the "\\127.0.0.1\c\file.dat" method is not what I'd like to
> do.
Hi Mike,
Sorry, you just have to use a File{Input,Output}Stream with an
SmbFile{Input,Output}Steam and copy buffers.
Although it would be neat of there were another copyTo method that
accepted a stream instead of a filename. That might be a little more
convenient.
I'll add this to the TODO at least.
Mike
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the jcifs
mailing list