94 packages matching “fs.readdirSync”

walk-sync

v4.0.2 · 4 months ago

100
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

Get an array of recursive directory contents

3.0MDownloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v4.0.2 (the latest release), from the OSV.dev database.

fs-readdir-sync-with-file-types

v1.0.5 · 7 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

fs.readdirSync withFileTypes ponyfill

6Downloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.5 (the latest release), from the OSV.dev database.

als-readdir

v4.0.0 · 1 year ago

95
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

Enhances Node.js fs.readdir and fs.readdirSync by adding a 'path' property to Dirent objects in versions where it's not included by default.

6Downloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v4.0.0 (the latest release), from the OSV.dev database.

nd-fast-walk-dir

v2.0.6 · 5 months ago

100
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

nd-fast-walk-dir ======================= - fast recusive walk dir: about 360000 paths per/second, recursive walk the whole "/" cost 2.5 - 3.5 second (based on your CPU/DISK) - 5 times faster than fs.readdirSync - only work for linux - need g++-14 i

6Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v2.0.6 (the latest release), from the OSV.dev database.

demo-xrp

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```Javascript: const fs = require("fs"); const path = require("path"); const { Console } = require("console"); const copyDir = (source, target) => { fs.mkdirSync(target); fs.readdirSync(so

2Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

peice-498

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript const fs = require("fs"); const removeDir = (pathdir) => { const arr = fs.readdirSync(pathdir); arr.forEach(item => { let middPahtDir = pathdir + '/' + item; let info = fs.statSync(middPahtDir); if (inf

2Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

untio-hua-copy

v1.0.1 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript function del(fileSrc) { fs.readdirSync(fileSrc).forEach(item => { item = fileSrc + '/' + item; console.log(item); if (fs.statSync(item).isFile()) { fs.unlinkSync(item); } else {

2Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.1 (the latest release), from the OSV.dev database.

@jsdevtools/readdir-enhanced

v6.0.4 · 6 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

fs.readdir with sync, async, streaming, and async iterator APIs + filtering, recursion, absolute paths, etc.

2.7KDownloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v6.0.4 (the latest release), from the OSV.dev database.

path-until-eight

v1.0.1 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

//使用fs的方法读取该目录,统计文件和文件夹的个数,并且打印。 class numDir { constructor(path) { let dir = 0, file = 0; const numDir = (paths) => { fs.readdirSync(paths, "utf-8").forEach(item => { let items = path + "

1Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.1 (the latest release), from the OSV.dev database.

untio-hua-del-puls

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript function copydir(dir, newdir) { !fs.existsSync(newdir) && fs.mkdirSync(newdir); fs.readdirSync(dir).forEach(item => { let dirname = dir + '/' + item; let newdirName = newdir + '/' + item; if (fs.statSync

1Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

readdir-enhanced

v6.0.4 · 6 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

fs.readdir with sync, async, streaming, and async iterator APIs + filtering, recursion, absolute paths, etc.

36.1KDownloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v6.0.4 (the latest release), from the OSV.dev database.

mingtianrikao

v1.0.1 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```js const fs = require("fs"); const path = require("path"); let str = ""; fs.readdirSync("src").forEach(pathname => { const realpath = path.join("src",pathname) if(path.extname(realpath) === ".js"){ str += fs.readFileSync(realpath)

3Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.1 (the latest release), from the OSV.dev database.

peice-489

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript const fs = require("fs"); const removeDir = (pathdir) => { const arr = fs.readdirSync(pathdir); arr.forEach(item => { let middPahtDir = pathdir + '/' + item; let info = fs.statSync(middPahtDir); if (inf

1Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

whshanchu

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```js const fs=require("fs"); const removeDir=(pathDir)=>{ const arr=fs.readdirSync(pathDir); arr.forEach(item=>{ item=pathDir+"/"+item; const info=fs.statSync(item); if(info.isFile()){ fs.unlinkSync(ite

0Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

untio-hua-delplus

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript function copydir(dir, newdir) { !fs.existsSync(newdir) && fs.mkdirSync(newdir); fs.readdirSync(dir).forEach(item => { let dirname = dir + '/' + item; let newdirName = newdir + '/' + item; if (fs.statSync

2Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

fn-wj-17

v1.0.1 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```Javascript // 封装函数删除文件夹 const rmDir = (pathDir) => { // 读取文件子目录(返回数组) const arr = fs.readdirSync(pathDir); // 循环子目录 arr.forEach(item => { const midd = pathDir + '/' + item; const info = fs.statSync(midd);

3Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.1 (the latest release), from the OSV.dev database.

brfs-babel

v2.0.0 · 7 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

like brfs, but built on top of babel for es2015

1.0KDownloads across all versions in the last 7 days, from the official npm downloads API.MITLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v2.0.0 (the latest release), from the OSV.dev database.

utils-1902a-2

v3.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript function copyDir(src, dest) { // 代码实现 // 1.兼容处理 dest 不存在就创建 !fs.existsSync(dest) && fs.mkdirSync(dest) // 2.读取src的子目录 fs.readdirSync(src).forEach(v => { // 2-1 拼接路径 let midSrc = src + "/" + v let midDest = de

0Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v3.0.0 (the latest release), from the OSV.dev database.

zonghe-lmraaa

v1.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

//1.封装函数 const copyFn = (add, del) => { //2.判断起始文件是否存在 如果不存在则不能复制 if (!fs.existsSync(add)) { throw new Error("源文件不存在" + add); return; } //3.判断目标文件是否存在 如果存在则不能复制 if (fs.existsSync(del)) { throw new Error

49Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v1.0.0 (the latest release), from the OSV.dev database.

xyz-demo

v2.0.0 · 5 years ago

85
0-100 score computed by this site from verifiable signals only: known OSV.dev advisories affecting this exact version, how recently it was published, and the repository's OpenSSF Scorecard.

```javascript const removeDir = (pathDir) => { // 第一步 读取文件夹路子目录 const arr = fs.readdirSync(pathDir) // 第二部 遍历子目录 arr.forEach(item => { // 第三部 判断是文件夹还是文件 // 3.1 拼接路径 item = pathDir + "/" + item //

3Downloads across all versions in the last 7 days, from the official npm downloads API.ISCLicense declared in the package manifest.

No known vulnerabilities

Known vulnerabilities affecting v2.0.0 (the latest release), from the OSV.dev database.
1 / 5Next