Comment

Comment by rossy

I think I prefer the string option. inodes (including Windows 64-bit file IDs) are opaque values. All you can do is compare them with one another and pass them to functions that accept inodes. Interpreting the integer value of the inode is meaningless. Using a string preserves these semantics, but using an array of numbers could be confusing/annoying because it breaks comparison with == and ===. Also, using a string would be forwards-compatible with any future changes to how Windows or Node identifies files, for example, Windows 8 has a 128-bit file ID type (which is needed for ReFS, I think.)
parent rossy 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton