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

feat: append EntryMode to Entry #1540

Closed
suyanhanx opened this issue Mar 9, 2023 · 7 comments · Fixed by #1543
Closed

feat: append EntryMode to Entry #1540

suyanhanx opened this issue Mar 9, 2023 · 7 comments · Fixed by #1543
Assignees

Comments

@suyanhanx
Copy link
Member

suyanhanx commented Mar 9, 2023

We should directly provide the EntryMode in the Entry, otherwise, they have to check the stat of each path one by one.

@suyanhanx
Copy link
Member Author

Or maybe we can add a new API like readdir.

@Xuanwo
Copy link
Member

Xuanwo commented Mar 9, 2023

We should directly provide the EntryMode in the Entry, otherwise, they have to check the stat of each path one by one.

Makes sense. Mode is required to be set in Metadata so we don't need to query it from entry. We can remove Mode from Metakey and provide mode at entry directly.

Do you want implement this part?

@suyanhanx
Copy link
Member Author

Count me in.

@suyanhanx
Copy link
Member Author

We can remove Mode from Metakey and provide mode at entry directly.

This doesn't conflict, right?

@Xuanwo
Copy link
Member

Xuanwo commented Mar 9, 2023

This doesn't conflict, right?

It's doesn't make sense to provide Metakey::Mode after mode() provided at Entry

@suyanhanx
Copy link
Member Author

It's doesn't make sense to provide Metakey::Mode after mode() provided at Entry

No. I think this level of redundancy is still acceptable.
After all, the Mode of Entry also comes from the metadata.

@Xuanwo
Copy link
Member

Xuanwo commented Mar 9, 2023

Ok, let's add mode() -> EntryMode and is_file & is_dir first.

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 a pull request may close this issue.

2 participants