During copy operation using nodejs fs library, i am trying to preserve modified time of the files being copied at destination.
Following is the code snippet.
writeStream.on("finish",()=>{
fs.utimesSync(destination, sourceStats.atime, sourceStats.mtime);
resolve("Copied "+source)
})
writeStream.on("error",(err)=>{
reject("!!ERROR @source@ "+source+" @dest@ "+destination+" @ERROR@"+err)
})
its working perfectly fine for source and destination located on local hardisk but for destination on network mapped drive (window 10) source file atime and mtime are not being updated.
Any clue in this regard will be highly appreciated.