Is there a way to specify the size/length of a file and have the system reserve the space needed? I'm looking for something like:
fs.write('file', Buffer, 1024*1024*54); // To create 54MB file.
答案 0 :(得分:5)
Just create a Buffer of that size?
fs.writeFile('file', new Buffer(1024*1024*54));