Skip to content

on Win10, fs.stat() returns a stats with undefined blksize and blocks#25913

@3cp

Description

@3cp
  • Version: 10.15.1, 10.14.1, 11.9.0
  • Platform: Windows10 64-bit (didn't test on other windows platform)
  • Subsystem: fs

On windows 10, blksize and blocks are undefined. This is a regression from v6 and v8 which are not affected.

As expected, both fs.stat() and fs.statSync() are affected.

This is easy to demo in a powershell.

> node > var fs = require('fs'); > var s = fs.statSync('any-valid-file'); > s; Stats{dev: 3759094541, mode: 33206, nlink: 1, uid: 0, gid: 0, rdev: 0, blksize: undefined, ino: 2814749767419687, size: 2526, blocks: undefined, atimeMs: 1549237516603.1382, mtimeMs: 1549237516603.1382, ctimeMs: 1549237516603.1382, birthtimeMs: 1549237516603.1382, atime: 2019-02-03T23:45:16.603Z, mtime: 2019-02-03T23:45:16.603Z, ctime: 2019-02-03T23:45:16.603Z, birthtime: 2019-02-03T23:45:16.603Z } > 

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