added doga

This commit is contained in:
szabomarton
2025-02-25 09:55:29 +01:00
parent 5174ab4cc4
commit 13254e5623
1149 changed files with 80161 additions and 0 deletions

24
25_02_24/node_modules/totalist/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
const { join, resolve } = require('path');
const { readdir, stat } = require('fs');
const { promisify } = require('util');
const toStats = promisify(stat);
const toRead = promisify(readdir);
async function totalist(dir, callback, pre='') {
dir = resolve('.', dir);
await toRead(dir).then(arr => {
return Promise.all(
arr.map(str => {
let abs = join(dir, str);
return toStats(abs).then(stats => {
return stats.isDirectory()
? totalist(abs, callback, join(pre, str))
: callback(join(pre, str), abs, stats)
});
})
);
});
}
exports.totalist = totalist;

22
25_02_24/node_modules/totalist/dist/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,22 @@
import { join, resolve } from 'path';
import { readdir, stat } from 'fs';
import { promisify } from 'util';
const toStats = promisify(stat);
const toRead = promisify(readdir);
export async function totalist(dir, callback, pre='') {
dir = resolve('.', dir);
await toRead(dir).then(arr => {
return Promise.all(
arr.map(str => {
let abs = join(dir, str);
return toStats(abs).then(stats => {
return stats.isDirectory()
? totalist(abs, callback, join(pre, str))
: callback(join(pre, str), abs, stats)
});
})
);
});
}