📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-06-30 14:37:17
📂
/ (Root)
/
home
/
orkouolp
/
nodevenv
/
node_js
/
orkofarms.com
/
18
/
lib
/
node_modules
/
jsdoc
/
lib
/
jsdoc
/
src
📍 /home/orkouolp/nodevenv/node_js/orkofarms.com/18/lib/node_modules/jsdoc/lib/jsdoc/src
🔄 Refresh
✏️
Editing: scanner.js
Writable
/** * @module jsdoc/src/scanner * @requires module:jsdoc/fs */ const EventEmitter = require('events').EventEmitter; const env = require('jsdoc/env'); const fs = require('jsdoc/fs'); const logger = require('jsdoc/util/logger'); const path = require('jsdoc/path'); /** * @extends module:events.EventEmitter */ class Scanner extends EventEmitter { constructor() { super(); } /** * Recursively searches the given searchPaths for js files. * @param {Array.<string>} searchPaths * @param {number} [depth] * @fires sourceFileFound */ scan(searchPaths = [], depth = 1, filter) { let currentFile; let filePaths = []; searchPaths.forEach($ => { const filepath = path.resolve( env.pwd, decodeURIComponent($) ); try { currentFile = fs.statSync(filepath); } catch (e) { logger.error('Unable to find the source file or directory %s', filepath); return; } if ( currentFile.isFile() ) { filePaths.push(filepath); } else { filePaths = filePaths.concat( fs.ls(filepath, depth) ); } }); filePaths = filePaths.filter($ => filter.isIncluded($)); filePaths = filePaths.filter($ => { const e = { fileName: $ }; this.emit('sourceFileFound', e); return !e.defaultPrevented; }); return filePaths; } } exports.Scanner = Scanner;
💾 Save Changes
❌ Cancel