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

Make FileMode._os public #3809

Merged
merged 1 commit into from
Jul 18, 2021
Merged

Make FileMode._os public #3809

merged 1 commit into from
Jul 18, 2021

Conversation

SeanTAllen
Copy link
Member

FileMode has always had a private method for getting an integer
representation of the file mode. However, it was private and only
available for use within the files package.

I discovered this when writing a pure pony tar library and needed
exactly the functionality of _os.

This commit changes _os from private to public as os and updates
its callers.

@SeanTAllen SeanTAllen requested review from chalcolith, Theodus and a team July 17, 2021 22:24
@SeanTAllen SeanTAllen added the changelog - changed Automatically add "Changed" CHANGELOG entry on merge label Jul 17, 2021
FileMode has always had a private method for getting an integer
representation of the file mode. However, it was private and only
available for use within the `files` package.

I discovered this when writing a pure pony tar library and needed
exactly the functionality of _os.

This commit changes `_os` from private to public as `os` and updates
its callers.
@SeanTAllen SeanTAllen merged commit afc8770 into main Jul 18, 2021
@SeanTAllen SeanTAllen deleted the mode-os branch July 18, 2021 00:35
github-actions bot pushed a commit that referenced this pull request Jul 18, 2021
github-actions bot pushed a commit that referenced this pull request Jul 18, 2021

FileMode has always had a private method for getting an integer representation of the file mode. However, it was private and only available for use within the `files` package.

It is now public as `FileMode.os`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os is kind of a weird name for this - as a private method that didn't matter much, but now that it's public, it kind of does. I'd kind of expect os to return me something that tells what operating system the filesystem is running within, as little sense as that may make.

I might have preferred something else, though my night-weary brain is unsure what the right thing to call it would be. Maybe just u32?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - changed Automatically add "Changed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants