Mo re spa ci ng
This commit is contained in:
parent
33b4c96a27
commit
559bdbc147
@ -138,17 +138,17 @@ export const fillFs = (): void => {
|
|||||||
bytesRead: number;
|
bytesRead: number;
|
||||||
buffer: Buffer;
|
buffer: Buffer;
|
||||||
}> => {
|
}> => {
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return rej(err);
|
return rej(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
res({
|
res({
|
||||||
bytesRead,
|
bytesRead,
|
||||||
buffer,
|
buffer,
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user