Reads the first line of a file efficiently using streaming. Useful for reading verdict from validator/checker output.
Path to the file
First line of the file
If file cannot be read
const verdict = await readFirstLine('/tmp/validator_output.txt');// Returns: 'VALID' or 'INVALID' Copy
const verdict = await readFirstLine('/tmp/validator_output.txt');// Returns: 'VALID' or 'INVALID'
Reads the first line of a file efficiently using streaming. Useful for reading verdict from validator/checker output.