Hello,
Using stat() you can retreive information about a file, is there a similar function to or way to set the values? If you modify a value in the stat structure that you populate, can you write it back to the file?
Printable View
Hello,
Using stat() you can retreive information about a file, is there a similar function to or way to set the values? If you modify a value in the stat structure that you populate, can you write it back to the file?
Well there are specific API calls like chmod / chown to update specific things, but there isn't a single API to allow you to change things arbitrarily.
if you want to modify the access/modify times, you can try the utime() function.
Thanks Ill take a look at utime()!