Skip to content

Can't fsync on Windows 8 #3879

Description

@louischatriot

Hi,

Running the code snippet below yields an EPERM: operation not permitted, fsync on my Windowws 8 machine:

var fs = require('fs');

var file = 'yam.js';   // Whatever existing file you choose

fs.open(file, 'r', function (err, fd) {
  console.log(err);    // Outputs null

  fs.fsync(fd, function (err) {
    console.log(err);   // Outputs 'EPERM: operation not permitted, fsync'
  });
})

I tried running this script from a cmd.exe and a Git Bash run as administrator to no avail, and couldn't find data on this on the internet and this repo's issues (not one mentions fsync!). Is it a known limitation in Windows?

Metadata

Metadata

Assignees

No one assigned

    Labels

    fsIssues and PRs related to the fs subsystem / file system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions