in Win API there is function SetFileTime but it is only for windows, so try like Wysota write