arudradey's picture
download
raw
688 Bytes
/**
* @license
* Copyright 2019 The Emscripten Authors
* SPDX-License-Identifier: MIT
*/
readBinary = (filename) => {
// We need to re-wrap `file://` strings to URLs.
filename = isFileURI(filename) ? new URL(filename) : filename;
var ret = fs.readFileSync(filename);
#if ASSERTIONS
assert(Buffer.isBuffer(ret));
#endif
return ret;
};
readAsync = async (filename, binary = true) => {
// See the comment in the `readBinary` function.
filename = isFileURI(filename) ? new URL(filename) : filename;
var ret = fs.readFileSync(filename, binary ? undefined : 'utf8');
#if ASSERTIONS
assert(binary ? Buffer.isBuffer(ret) : typeof ret == 'string');
#endif
return ret;
};

Xet Storage Details

Size:
688 Bytes
·
Xet hash:
3463cb3615c47b3bdcbd8e806a5bf050b9391fac533826c12d7a825003c5b175

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.