Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support other attributes #66

Open
data-man opened this issue Feb 20, 2024 · 2 comments
Open

Support other attributes #66

data-man opened this issue Feb 20, 2024 · 2 comments

Comments

@data-man
Copy link

data-man commented Feb 20, 2024

Thank you, metastore is cool!

I tried add support atime, ctime and size in my branch: https://github.com/data-man/metastore/tree/other_times.

@przemoc
Copy link
Owner

przemoc commented Feb 23, 2024

Thank you for your interest in metastore, all credits go to original author, David.

From metadata perspective I think there is limited value in storing atime or ctime. ctime is also not easy to apply, as you possibly already noticed. I can see why some would want to keep track of size, but size cannot be applied (at least not in non-destructive way if file would need to get smaller).

BTW long is a bad choice for keeping size, it wouldn't fit bigger files on 32-bit systems and some 64-bit systems (ILP32, LLP64). off_t would be better, but you would need to compile program with -D_FILE_OFFSET_BITS=64. Actually you need to compile with this define anyway (unless you're using musl libc), otherwise stat family of functions fail with EOVERFLOW for 2GB+ files.

@mrhawkin
Copy link

Thanks for the effort @data-man! I was actually missing the additional time fields.
Even if some of theese items are not fully usable to apply back to a filetree as @przemoc mention, they are still useful in situation one wants to lookup the original metadata when data has been moved to s3 or other storage solution that doesnt preserve all this metadata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants