如文档上写的,同步读取文件,encoding 参数 明明是第4个参数,但其实是第二个参数。
真是坑人没商量呀。
fs.readSync(fd, length, position, encoding) Synchronous version of
string-based fs.read. Returns the number of bytesRead.
基于字符串的fs.read的同步版本,返回已经读入的数据的字节数。
如文档上写的,同步读取文件,encoding 参数 明明是第4个参数,但其实是第二个参数。
真是坑人没商量呀。
fs.readSync(fd, length, position, encoding) Synchronous version of
string-based fs.read. Returns the number of bytesRead.
基于字符串的fs.read的同步版本,返回已经读入的数据的字节数。