d0k3 / GodMode9

GodMode9 Explorer - A full access file browser for the Nintendo 3DS console :godmode:
GNU General Public License v3.0
2.12k stars 191 forks source link

[FEATURE REQUEST] Add creation date to File Info #758

Closed blueberryfigapricotrye closed 2 years ago

blueberryfigapricotrye commented 2 years ago

Got a great idea on how to improve GodMode9? Currently GodMode9 v2.1.0 shows only "Modified" timestamps at File Info. For me it is too little details. The "Created" timestamps should be displayed. snap_220121024057

Describe the feature you'd like I'm used to seeing "Modified" and "Created" timestamps in the default file manager on my Windows and macOS notebook when I use my SD card from the 3DS or local external hard drive. Here what I mean exactly.

File Explorer (Windows 11) 1

Finder (macOS 12) 2

Describe alternatives you've considered There is no alternative.

novialriptide commented 2 years ago

I'm looking through FILINFO documentation right now and it seems like this isn't possible. If someone could correct me, that would be great.

ZeroSkill1 commented 2 years ago

It shows modified for files and created for directories. This is because FILINFO contains the "last modified" date in case of files and the "created" date/time in case of directories:

fdate: The date when the file was modified or the directory was created. ftime: The time when the file was modified or the directory was created.

So yeah, not possible.

Wolfvak commented 2 years ago

Technically speaking the FAT Filesystem itself doesn't even support creation timestamps, only last modification. There are semi-standard extensions that allow this by storing the data in a reserved area but they're not supported by FATFS, and even if they were they're basically a hack (for Win9x) and we have no way to guarantee it'll work on all FAT-capable machines.

Closing this as not possible, as said by the two messages above.

blueberryfigapricotrye commented 2 years ago

Thank you for the quick responses. I have some unexplained questions now.

I'm looking through FILINFO documentation right now and it seems like this isn't possible. If someone could correct me, that would be great.

It shows modified for files and created for directories. This is because FILINFO contains the "last modified" date in case of files and the "created" date/time in case of directories:

fdate: The date when the file was modified or the directory was created. ftime: The time when the file was modified or the directory was created.

So yeah, not possible.

Steps to reproduce:

  1. Use File Explorer (Windows 11) and Finder (macOS 12). Create a directory and a file. Make it so that Modified timestamp is updated for directory and file.
  2. Timestamp for directory:
    • Created: 2022-01-21 11:37:26
    • Modified: 2022-01-22 03:49:07
  3. Timestamp for file:
    • Created: 2022-01-21 16:34:51
    • Modified: 2022-01-22 07:19:24
  4. Insert the SD card to 3DS.
  5. Turn on the 3DS and start GodMode9.
  6. Now look file and directory info.
  7. Timestamp for directory:
    • created: 2022-01-22 03:49:07
  8. Timestamp for file:
    • modified: 2022-01-22 07:19:24
  9. The problem is that under directory info "created" modified timestamp is displayed and not created timestamp.

Note: Under File Info "modified" displays the modified timestamps - there are no problems here. Note 2: The SD card uses FAT32.

Question: Can you see this problem (see point 9) on your side? Is it possible that it is a bug from FILINFO?

blueberryfigapricotrye commented 2 years ago

Technically speaking the FAT Filesystem itself doesn't even support creation timestamps, only last modification.

According to this documentation, FAT and exFAT stores creation time. It doesn't look like a hack, these filesystems support this in general. In my case FAT32 and exFAT should have no problems with creation time, because on Windows 11 and macOS 12 the standard file managers show the creation time.

See in the right table under Dates recorded: https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system https://en.wikipedia.org/wiki/ExFAT

novialriptide commented 2 years ago

Technically speaking the FAT Filesystem itself doesn't even support creation timestamps, only last modification.

According to this documentation, FAT and exFAT stores creation time. It doesn't look like a hack, these filesystems support this in general. In my case FAT32 and exFAT should have no problems with creation time, because on Windows 11 and macOS 12 the standard file managers show the creation time.

See in the right table under Dates recorded: https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system https://en.wikipedia.org/wiki/ExFAT

If you can find documentation leading to getting file creation dates in C, that'll be of more use than a Wikipedia. It doesn't look like it's possible at the moment.

blueberryfigapricotrye commented 2 years ago

Technically speaking the FAT Filesystem itself doesn't even support creation timestamps, only last modification.

According to this documentation, FAT and exFAT stores creation time. It doesn't look like a hack, these filesystems support this in general. In my case FAT32 and exFAT should have no problems with creation time, because on Windows 11 and macOS 12 the standard file managers show the creation time. See in the right table under Dates recorded: https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system https://en.wikipedia.org/wiki/ExFAT

If you can find documentation leading to getting file creation dates in C, that'll be of more use than a Wikipedia. It doesn't look like it's possible at the moment.

It looks like there is no such thing in C standard. It looks like the developers of FATFS need to support this and additionally fix the bug in this report (see point 9) https://github.com/d0k3/GodMode9/issues/758#issuecomment-1019308859 because according to the test it does not support the created timestamp for directories. It only supports modified timestamps for files and folders.

Another question is there a system call from Nintendo 3DS operating system to display file info?

novialriptide commented 2 years ago

Another question is there a system call from Nintendo 3DS operating system to display file info?

I don't think that's publicly available.

Wolfvak commented 2 years ago

According to this documentation, FAT and exFAT stores creation time. It doesn't look like a hack, these filesystems support this in general. In my case FAT32 and exFAT should have no problems with creation time, because on Windows 11 and macOS 12 the standard file managers show the creation time.

Check your own sources, creation time is available in DOS 7.x and later (basically Win9x). It does mean it's well supported by mainstream OSes, but it's not really a part of the specification itself. In the end, it means it doesn't need to be supported and FATFS rightfully doesn't do it.

We don't support exFAT anyway, so that's a non-issue.

blueberryfigapricotrye commented 2 years ago

Check your own sources, creation time is available in DOS 7.x and later (basically Win9x). It does mean it's well supported by mainstream OSes, but it's not really a part of the specification itself. In the end, it means it doesn't need to be supported and FATFS rightfully doesn't do it.

Are you a FATFS developer or why this seemingly official answer from a FATFS developer?

If the FATFS developers don't want it, I accept that decision, but there are open questions that have not been answered. If the FATFS developers didn't want it, then I would have expected creation time to be generally not mentioned under FILINFO documentation. https://github.com/d0k3/GodMode9/issues/758#issuecomment-1019116356

It looks like it is intended to support creation time, only there are bugs in the current version.

That's why it would be very helpful if you can reopen the report here, because it's a feature request. FAT32 supports a total of 3 timestamps as I see it, Created, Modified and Accessed. The third timestamp Accessed I would like to be able to display also in GodMode9.

urherenow commented 2 years ago

You don't seem to know how GitHub works. Anyone besides yourself who has the power to close your issue/request is either the creator or a trusted collaborator. Your request has been denied, so move on. If it's code borrowed from a 3rd party library, and you think there is a bug, then your issue belongs with said library anyway. Not here.