filerjs / filer

Node-like file system for browsers
BSD 2-Clause "Simplified" License
617 stars 154 forks source link

Add birthtime to file node layout for file creation time #737

Open humphd opened 5 years ago

humphd commented 5 years ago

Our filenode layout includes atime, mtime, and ctime. We don't have birthtime. See https://nodejs.org/api/fs.html#fs_stat_time_values. We'd also need to add this to Stats as birthtime and birthtimeMs.

This would be a breaking change, requiring us to substitute something like ctime in older versions of a filesystem.

andrewkoung commented 5 years ago

@humphd I'm currently analyzing this issue out of interest if you don't mind cause maybe I'll understand the purpose of the project since I still don't. I took a look into the node.js and stats.js files though since they seemed to be the place where the additions will happen, but wanted to know the significance of these files.

humphd commented 5 years ago

The idea of this would be that when we create a file node, in addition to setting the atime, mtime, and ctime, we'd also add birthtime and it would never change.