Is there any way to get file/dir modification date?


Basically, that’s it. There’s onDidChange(), but no getModifiedDate(). Is it just me, or is there no real api to get file/dir modification timestamp?

Background: I’m working on an owncloud/nextcloud/dropbox configuration synchronisation helper plugin that will tar/untar selected configuration pieces (namely all configuration and all packages).

For those eager to try, here’s my repo: (Don’t expect much, I’m more a linux kernel guy, that rarely does js these days. At the moment it’s linux only, but I plan to support mac and win as soon as I get all the basic stuff running).


Not a direct answer to your question, but I was scripting operations for dragging image files into my app yesterday, using event.dataTransfer.files from the browser API, and that returns dates for the files. For example, on dropping a file into the window, I was able to log this information to the console:

Thu Dec 13 2012 16:17:47 GMT+0900 (KST)

Now, I don’t know whether you might be able to leverage that in some way, or if it might set you on the right track to finding a solution, but there you go …


Sounds like you may want to try out Node’s fs module. Since Atom is built on Node, it has access to all of Node’s modules as well.


Thanks a ton! Looks like that was exactly just what I needed to get it working.
I’ve just published the first working version of the plugin today at atom-ownsync