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

Permission mode for windows *alongside* the Unix implementation #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thearian
Copy link

@thearian thearian commented May 2, 2023

Fixed #40 and #37 by implementing a -somewhat- cross platform solution.

This issues were addressed before, in #38 but it is imaginably not precise in Unix.
(Since 755 permission mode is not quite the readonly, but windows users just don't have much of a choice)

So I made a OS dependent function to check a file metadata permission: is_readable.

  • In Unix: This function will be checking the 755 mode (aka the previous method)
  • In Windows: It will return whether the directory is readonly or not

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.

Code Error: no method named mode found for struct Permissions in the current scope
1 participant