function readFileAsText(file) {
    return __awaiter(this, void 0, void 0, function* () {
        if (isInputFile(file)) {
            return uint8ArrayToString(file.content);
        }
        if (isOutputFile(file)) {
            return yield blobToString(file.blob);
        }
    });
}
Read files as string. Useful when files contains plain text like in the output file info.txt of `convert logo: -format '%[pixel:p{0,0}]' info:info.txt`