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

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -