e2ed
Version:
E2E testing framework over Playwright
12 lines (11 loc) • 388 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFileSize = void 0;
const promises_1 = require("node:fs/promises");
/**
* Get file size in bytes.
* If the file does not exist, return a value of 0 bytes.
* @internal
*/
const getFileSize = (path) => (0, promises_1.stat)(path).then(({ size }) => size, () => 0);
exports.getFileSize = getFileSize;