question about changing permission with boost

Hi, I am trying to copy a file from one folder to another, but I am also trying to access to the last_write_time of the file, BEFORE copying it to the other folder, And I notice, whenever I am inside a Read-only directory, and trying to access the "last_write_time" of a Read-only file, I get the following error message: what(): boost::filesystem::last_write_time: Permission denied: "src/ temp1/methodologies.ppt" In this scenario "temp1" is a Read-only directory, also methodologies.ppt is a Read-only file as well. Does anyone know how to get around this? Is there a way to change the directory/file permission (to write) prior to copying, and then change the permission back again? I need to access the time-stamp before copying the file, because right after I copy the file, the date-stamp will be updated. I would really appreciate some help, please advise, thanks, RB
participants (1)
-
rudy b