Hello everybody,
Sorry for my poor english but I'm French :-).
I want to copy a file from my computer (locally) to a SMB share but unfortunately It fails and I don't know why. I've got an exception "Access Denied" despite the SMB share is on full control for Everyone.
I also write file.canWrite() and the return is true !
Finally I can alors create directories as I want....
Could you tell me what I did wrong in the code below ? (in fact I can succefully logon on the SMB share)
private void copyFile(File from, SmbFile shareTo) throws Exception {
FileInputStream in = new FileInputStream( from );
SmbFileOutputStream out = new SmbFileOutputStream(shareTo);
byte[] b = new byte[8192];
int n, tot = 0;
while(( n = in.read( b )) > 0 ) {
out.write( b, 0, n );
}
in.close();
out.close();
}
Is it JCIFS that cannot do such that things ?
Thanks !