Changing file modification date

Post Reply
Gearmo3DS
Posts: 6
Joined: Sat Nov 25, 2023 2:37 pm

Changing file modification date

Post by Gearmo3DS » Tue Sep 10, 2024 6:35 pm

I could not find a way to modify the file modification time-stamp of files in libctru for the 3DS.
I assume it is not implemented or possible but wanted to double check here just in case.
My use-case is file-synchronization between a PC or other devices via network/web file transfer.
When a 3DS app transfers an old external file to the SD-card then the code logic would incorrectly detect the file being newer than the original one on the PC (or source location).


WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Changing file modification date

Post by WinterMute » Mon Oct 28, 2024 5:19 pm

From what we can determine the only way you can update the timestamp is by actually writing to the file and even then you can only change the timestamp to "now". We haven't found a way to set timestamps to arbitrary values, sorry.

Help keep devkitPro toolchains free, Donate today

Personal Blog

Gearmo3DS
Posts: 6
Joined: Sat Nov 25, 2023 2:37 pm

Re: Changing file modification date

Post by Gearmo3DS » Mon Oct 28, 2024 5:51 pm

No worries. I plan to "outsource" the file dates as meta data to work around it.


Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests