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

add accessors for the underlying stat data #38

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

cehteh
Copy link
Contributor

@cehteh cehteh commented Apr 17, 2021

This anticipates the statx() interface I'll add soon.

Breaking change: Adds a 'SimpleType::Unknown' which can be returned when the filetype can't be
determinded. Code matching on SimpleType may add a clause for this when there is no catch-all.

This anticipates the statx() interface I'll add soon.

Breaking change: Adds a 'SimpleType::Unknown' which can be returned when the filetype can't be
determinded. Code matching on SimpleType may add a clause for this when there is no catch-all.
@cehteh
Copy link
Contributor Author

cehteh commented Apr 17, 2021

The above adds interfaces to the low level stat data as Option<>. The return types are
(mostly) from what the Linux statx() provides. My plan is to make this portable for now (fix
the integration tests). Later add a 'statx' as feature and use statx() instead stat() when
enabled. With statx() one can do some optimizations like querying only parts of the stat data
or build the metadata structure on demand when queried.

@cehteh cehteh marked this pull request as ready for review April 18, 2021 01:51
@cehteh
Copy link
Contributor Author

cehteh commented Apr 18, 2021

Checks passed, but not extensively tested now. I will use and test that in my project now. The 'statx()' implementation will be postponed until this API has be stabilized.

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

Successfully merging this pull request may close these issues.

1 participant