Obsidian should update the "Date Last Opened " file attribute on Mac OS / Linux

Use case or problem

Mac OS has a file date attribute called “date last opened”. This date is updated every time a file is opened, as opposed to, say, modified. This date can be very useful in reviewing notes for archiving purposes. For instance, in a search for all notes that have not been opened in more than 12 months. I believe Linux has a similar file date attribute.

Proposed solution

I believe there is a file system call that can be made to update the last opened date when an application opens a file. You can see this behavior in PDF files. Open a PDF file with the Preview app on the Mac and you will see the Last Opened date updated. Currently, opening a PDF (or other note file) in Obsidian does not update this date.

Other text editors update this file attribute as well. Ones that I have confirmed include Atom, TextEdit, Sublime.

Current workaround (optional)

If the note is opened in another text editor, the last opened date will be updated. For instance, opening an Obsidian note in Atom correctly updates the Last Opened date attribute. But this is cumbersome and having the update be an automatic part of Obsidian’s file functionality would be ideal

Related feature requests (optional)

N/A

10 Likes

+1

On Windows, NTFS has support for a last accessed date too. It was enabled by default in Windows XP but I think from Vista onwards it was changed to being disabled by default as a ‘performance tweak’ :roll_eyes:

It can be re-enabled via the following registry key:

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc959914(v=technet.10)

So it would be possible to have feature parity across the desktop OSes :+1:

1 Like

I realize that this is old, but I was running into the same thing.

I created a plugin that sets the atime on the file when it’s opened. Consider this unsupported and I’m not going to bother adding to the official plugins, but I find it useful. It’s dead-simple and works on my Mac using the touch command. I have the code and a DataVIew example here:


1 Like