Why can't I move files in java with
source.renameTo(new File(target));
to a samba share mounted to /mnt/foo (cifs mount in /etc/fstab)
I can use mv, cp with that share - it works perfectly.
The java code works on the local drive and is ok but it doesn't work with the mounted samba share.
Any idea why? How can I move files with java to a mounted folder?
(I only get a failed to move file (false) no exception ...)
The rename method documents numerous limitations, including the possibility of not being able to move between different file systems. It also points to the move method on the (new in java 7) Files utility which should be able to do the job.