download
raw
404 Bytes
import { dirname, resolve } from 'path';
import { readdirSync, statSync } from 'fs';
export default 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:
404 Bytes
·
Xet hash:
2228c5ac38431e3886c9999d342eca7342c78a9d8c76d2ed306f48ce707119ab

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