download
raw
416 Bytes
const { dirname, resolve } = require('path');
const { readdirSync, statSync } = require('fs');
module.exports = function (start, callback) {
let dir = resolve('.', start);
let tmp, stats = statSync(dir);
if (!stats.isDirectory()) {
dir = dirname(dir);
}
while (true) {
tmp = callback(dir, readdirSync(dir));
if (tmp) return resolve(dir, tmp);
dir = dirname(tmp = dir);
if (tmp === dir) break;
}
}

Xet Storage Details

Size:
416 Bytes
·
Xet hash:
d0d88f0346d514e77a9038783bf6901ae4222cbb5d961cb465e2420ee21504b2

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