Method description:
File content interception operation.
Grammar:
Since this method belongs to the fs module, the fs module needs to be introduced before use (var fs= require(“fs”) )
Receive parameters:
path File path
len truncates the length, retaining only the characters within the character length, and the excess will be cleared.
callback Callback, passing an exception parameter err
Example:
Source code: