When I tried to set the atime and mtime of a file (f) via:

import std.datetime;
auto time = Clock.currTime();
setTimes(f,time,time);

I get "Operation not permitted."

This is caused on linux by the rule, that if you are not the owner of the file
you may only set the mtime of a file to current time.

A simple "touch filename" in terminal works.

Any hint? Do I have to use execute("touch filename")?

  • howto touch a file - setTimes Martin Tschierschke via Digitalmars-d-learn

Reply via email to