196 posts
Location
Hiding in Online Storage
Posted 17 January 2016 - 08:29 PM
Does anyone have thoughts on the best way to store metadata for a file? For example; owner, last modified, etc.
So far my thoughts have been a large table serialise to a file for storage after a shutdown that would be put into memory on boot.
My other thought was to store it within the file name as a serialised table and modify the fs api to unserialize it to get the data and the actual file name.
Anyone else have thoughts?
Edited on 17 January 2016 - 07:31 PM
724 posts
Location
Kinda lost
Posted 17 January 2016 - 08:35 PM
Well file name one sounds problematic due to fact that some symbols are not allowed in file-names and they may exist in meta-data.
Personally would go with one big file updated every time data changes instead of shutdown cause you can't detect all shutdown types.
Edited on 17 January 2016 - 07:36 PM
196 posts
Location
Hiding in Online Storage
Posted 17 January 2016 - 08:37 PM
Well file name one sounds problematic due to fact that some symbols are not allowed in file-names and they may exist in meta-data.
Personally would go with one big file updated every time data changes instead of shutdown cause you can't detect all shutdown types.
That is what I had meant, save it on change rather than before shutdown.
3057 posts
Location
United States of America
Posted 17 January 2016 - 08:39 PM
196 posts
Location
Hiding in Online Storage
Posted 17 January 2016 - 08:49 PM
Reading through that it appears to be a great solution. Thank you very much.
1140 posts
Location
Kaunas, Lithuania
Posted 18 January 2016 - 01:06 PM
Reading through that it appears to be a great solution. Thank you very much.
It's not only a good solution - it's being used by other programs already.