About checking directory permissions #44871
Unanswered
KazukiSugiyama107
asked this question in
General
Replies: 1 comment 2 replies
-
I'm moving this to a discussion. The bug tracker is not a support forum. To answer your question: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What is the problem this feature will solve?
This is a little different from a feature request, but since there has been no progress on the issue I have set up in
nodejs/help
, I will ask here, and if the feature does not exist, I will make a feature request.The following is the issue created in
nodejs/help
.nodejs/help#3871
We wanted to check the permissions of a directory and were trying to use
fs.accessSync
.We have confirmed that the results are correct on macOS, but not on Windows OS.
I have confirmed that using
fs.openSync
produces the correct results for Windows OS, but why do these differences occur?Also, there is no mention in the node.js documentation that the behavior changes for each OS, but is using
fs.openSync
the correct way to check directory permissions on Windows OS?fs.accessSync
checkMac OS
Windows OS
What is the feature you are proposing to solve the problem?
A method that does not return different results on macOS and Windows OS.
Or, we think it would be easier to add an explanation on the documentation to show that the results are different depending on the OS.
What alternatives have you considered?
No response
Beta Was this translation helpful? Give feedback.
All reactions