How do you move a file from a local non-SMB folder to a SMB location in the server?
Below code doesn't work, but it's something like this what I am after. I am able to authenticate the smb location.
String sourceFile="target/abc.xml";
String smbDestinationFile="sharePath/abc/smblocation/xyz.xml";
SmbFile sTargetFile = performAuthenticationAndChecks(destinationFile, domain, domainUsername,
domainPassword);
Files.move(Paths.get(sourceFile), (Path) sTargetFile);
I get this error:
java.lang.ClassCastException: jcifs.smb1.smb1.SmbFile cannot be cast to java.nio.file.Path