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

Document the way data is encoded within FileInfo #40

Open
lpil opened this issue Nov 25, 2024 · 4 comments
Open

Document the way data is encoded within FileInfo #40

lpil opened this issue Nov 25, 2024 · 4 comments

Comments

@lpil
Copy link
Contributor

lpil commented Nov 25, 2024

Hello! How do I do this?

I think it might be using the mode int, but how data is encoded into that int is not documented.

File mode that indicates the file type and its permissions. For example, in Unix and Linux, a mode value of 33188 indicates a regular file and the permissions associated with it (read and write for the owner, and read-only for others, in this case).

Thanks,
Louis

@bcpeinhardt
Copy link
Owner

Hello!
There's a helper function called file_info_type!

@lpil
Copy link
Contributor Author

lpil commented Nov 25, 2024

That's great! Thank you.

I still think it would be useful to document what this field means, I don't know how to use it presently.

@lpil lpil changed the title How do I tell if a file is a directory from FileInfo Document the way data is encoded within FileInfo Nov 25, 2024
@bcpeinhardt
Copy link
Owner

I agree. I'm gonna add the relevant documentation, in the meantime just for you check out https://www.man7.org/linux/man-pages/man7/inode.7.html (scroll down to "The file type and mode")

@bcpeinhardt
Copy link
Owner

Completely let this slip. For the moment I've just linked to that man page in the docs. I need to time block check ins with my existing repos.

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

2 participants