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: Add Builder::permissions() method. #273

Merged
merged 5 commits into from
Feb 5, 2024

Commits on Feb 4, 2024

  1. feat: Add Builder::permissions() method.

    With it it's possible to change the default mode of tempfiles on
    unix systems.
    
    The example also doesn't hide the fact that it is currently only
    useful on Unix, but as the ecosystem matures, thanks to the usage
    of `std::fs::Permissions` it should be able grow into more platforms
    over time.
    Byron committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    c50907d View commit details
    Browse the repository at this point in the history
  2. Use permissions field of Builder on Unix to affect file mode

    The implementation favors the least invasive solution even though
    its forced to pull platform dependent code up.
    
    The alternative would have been to alter the method signatures
    of `create_named()` on all platforms.
    Byron committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    334eb14 View commit details
    Browse the repository at this point in the history
  3. Respect module boundaries and make all platforms permissions aware.

    This way, permissions can be passed and handled by platform specific
    code, which avoid having to use platform dependent code in the top-level.
    Byron committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    5ffc706 View commit details
    Browse the repository at this point in the history
  4. Fail on Windows if somebody tries to set permissions there.

    That way, there will be no surprises as would be the case with
    doing nothing.
    Byron committed Feb 4, 2024
    Configuration menu
    Copy the full SHA
    7a80c77 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2024

  1. Configuration menu
    Copy the full SHA
    e374091 View commit details
    Browse the repository at this point in the history