Skip to content

fs: support utimes BigInt #50859

Closed as not planned
Closed as not planned
@guybedford

Description

@guybedford

What is the problem this feature will solve?

Current utimes FS functions have a granularity of microseconds, while the stats BigInt functionality has a granularity of nanoseconds.

What is the feature you are proposing to solve the problem?

Adding support for BigInt to the utimes functions to enable nanosecond granularity for setting timestamps.

What alternatives have you considered?

The underlying reason for this issue is that floating point second values only have 24 significant digits, which does not extend to exact nanoseconds. Having stats support BigInt u64 times, while having utimes not creates the inability to exactly set and read the same level of precision. Relying on a BigInt input as a u64 nanoseconds value seems the most sensible way to resolve this to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions