java - smbFile setLastModified not working on Windows share -


i'm using jcifs library copy jpg phone windows share. file copy works fine, setlastmodified method doesn't have effect. have full write permissions share in question. there other way of setting last modified date on file have created?

smbfile sfile = new smbfile(destfilename, auth); fileinputstream fileinputstream = new fileinputstream(new file(ssourcefilepath)); byte[] buf = new byte[16 * 1024 * 1024]; int len; while ((len = fileinputstream.read(buf)) > 0) {     sfos.write(buf, 0, len); } fileinputstream.close(); sfos.close(); sfile.setcreatetime(file_modified_date); sfile.setlastmodified(file_modified_date);                                       


Comments

Popular posts from this blog

php - How can an email be returned from Stripe Checkout? -

SQL php on different pages to Insert (mysqli) -

linked list - Get the index of the Node in a LinkedList which contains the given value in java -