(while I’m testing beta2 and reporting issues, trying to be a useful developer and aware of the fact that I should help finalize the release, I can’t help but having to prototype an idea I have been breeding for ages now, starting already back in classic BeOS times…)
I need to store references to files and directories in an efficient way in attributes (more context later, for now please don’t ask ).
For that, I want to store the inode, so I don’t have to rely on the path and can resolve the file as long as it stays on the same device.
I can easily get the inode of a file and store that, and I’m aware that I need the directory to go back again, but so far have been unable to resolve the file from the inode.
It’s been a long time since I’ve used the storage kit and friends, but I can’t quite wrap my head around the API regarding traversal between nodes, refs and stats.
It’s easy to go from high level to low level (file to inode), but not back again, as for some reason, storage kit only provides functions for higher level structures, but I can’t for example create an entry_ref from an inode.
I can get from inode to stat, but not to entry.
I’m sorry if this is a bit confusing, I don’t have the code at hand right now as my only HaikuOS capable laptop has issues.
So I’m kind of lost in low level land and seem to fall in the gaps of the API.
Any helping pointer (literally ) here?