()
| 13 | const abortController = new AbortController(); |
| 14 | |
| 15 | const readInitialContent = () => { |
| 16 | const fileStream = fs.createReadStream(filePath, { encoding: 'utf8', start: 0 }); |
| 17 | |
| 18 | fileStream.on('data', chunk => { |
| 19 | process.stdout.write(chunk); |
| 20 | }); |
| 21 | |
| 22 | fileStream.on('end', () => { |
| 23 | fileSize = fs.statSync(filePath).size; |
| 24 | |
| 25 | if (!isWatching) { |
| 26 | startWatching(); |
| 27 | } |
| 28 | }); |
| 29 | }; |
| 30 | |
| 31 | const startWatching = () => { |
| 32 | isWatching = true; |
no test coverage detected