fsPromises.truncate(path[, len])


path 上的内容截断(缩短或延长长度)到 len 个字节。

Truncates (shortens or extends the length) of the content at path to len bytes.