nodejs / nodejs/node

fs: support utimes BigInt

オープン
#50,859 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

feature request fs never-stale
主要言語
JavaScript
スター
122k
フォーク
37.3k
平均マージ
4日 2時間
マージ済み PR(30日)
283

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、filesystem の utimes 関数と既存の stats の BigInt 機能を特定します。それぞれがタイムスタンプの精度をどのように表現しているかを比較し、関連するプラットフォーム固有のパスを特定します。BigInt 入力でナノ秒精度のタイムスタンプを設定でき、それらの値を一致する精度で読み戻せれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
operating-systems
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。