nodejs/node

Missing documentation in `fs.StatFs`

Fechada

#50.749 aberto em 15 de nov. de 2023

 (9 comentários) (5 reações) (0 responsável)JavaScript (35.535 forks)batch import
docfsgood first issue

Métricas do repositório

Stars
 (117.218 estrelas)
Métricas de merge de PR
 (Mesclagem média 18d 17h) (219 fundiu PRs em 30d)

Description

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?

Guia do colaborador