Skip to content

fs.utimes return errors on Windows #5561

@simon-tannai

Description

@simon-tannai

Hi !

I'm using fs.utimes in node script on Ubuntu, all work fine.
But when I'm launching this script on Windows, I get an error:

{ [Error: EINVAL: invalid argument, utime 'C:\Users\sit\Documents\_TRAVAUX\app\client_websocket_webdav\files\Corporate\issue3584.pdf']
  errno: -4071,
  code: 'EINVAL',
  syscall: 'utime',
  path: 'C:\\Users\\sit\\Documents\\_TRAVAUX\\app\\client_websocket_webdav\\files\\Corporate\\issue3584.pdf' }

The small script:

  fs.utimes(fullPathOfFile, currentUnixTimestamp, modifiedUnixTimestamp, function(err){
    if( err ) {
      console.log(err);
    }
  });

Have you any solution ?

  • Version: v5.1.0
  • Platform: Windows 7 64 bits

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions