Skip to content

fs.access is not reliable in windows7 #7700

Description

@leftstick
  • Version:
    v6.3.0
  • Platform:
    64-bit (Windows 7)

When performing following code:

var fs = require('fs');

fs.access('C:/Windows/System32/drivers/etc/hosts', fs.F_OK, function(err) {
    console.log('err', err); //err null
});

I am pretty sure i don't have write permission to the hosts file. But it resolves null to err.

Am i wrong with the usage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions