nodejs/node

Missing documentation in `fs.StatFs`

已關閉

#50,749 建立於 2023年11月15日

 (9 則留言) (5 個反應) (0 位負責人)JavaScript (35,535 個分叉)batch import
docfsgood first issue

倉庫指標

星標
 (117,218 顆星)
PR 合併指標
 (平均合併 18天 17小時) (30 天內合併 219 個 PR)

描述

Affected URL(s)

https://nodejs.org/api/fs.html#class-fsstatfs

Description of the problem

  • statfs.bsize fails to mention if the size is reported in bits or bytes
  • While statfs.bavail and statfs.bfree can be used to calculate available and free space, it would be appropriate to put an example on how to use them Example:
    import { statfs } from "fs/promises"
    const statsfs = await statfs("/tmp")
    const available_bits_or_bytes_not_documented = statsfs.bsize * statsfs.bavail
    
  • Similarly, statfs.blocks and statfs.files would strongly benefit from an example
  • What's statfs.type and why is it a number?

貢獻者指南