Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
filetree.js
Advanced tools
Recursively list files in directory hierarchy as a readable tree upto specified depth while excluding unwanted folder names
Recursively list files in directory hierarchy as a readable tree upto specified depth while excluding unwanted folder names
npm install -g filetree.js
npm install --save filetree.js
Recursively lists files in myFolder and subdirectories upto two levels down, excluding any file or folder with the name 'node_modules' and 'bower_components'. Includes normally hidden files and folders and does not indent file/folder paths based on their depth level.
./filetree --path ./myFolder \
--max-depth 2 \
--exclude node_modules bower_components \
--all \
--no-indent
Same as the CLI Example.
var filetree = require('filetree.js');
filetree({
path: './myFolder',
maxDepth: 2,
exclude: ['node_modules', 'bower_components'],
all: true,
indent: false
});
All arguments are optional
All arguments are optional
filetree [-p <target path>]
[-m <max recursion depth>]
[-x <excluded names>]
[-a]
[-i]
Options:
--path, -p Print contents of directory at this path (relative or
absolute)
[string] [default: /Users/aihamhammami/Projects/filetree.js]
--max-depth, -m Maximum directory recursion depth [default: Unlimited]
--exclude, -x Exclude file and folder names [array] [default: []]
--all, -a Include files and folders beginning with a period
[boolean] [default: false]
--indent, -i Indent paths based on their depth level
[boolean] [default: true]
--version, -V Show version number [boolean]
--help, -h Show help [boolean]
Examples:
filetree -m 0 Only print root directory
filetree -m 2 Print root and the two lower levels of
directories
filetree -x build tmp test Exclude multiple folder names
filetree -p myGitProject -a Includes .git which is normally ignored
filetree --no-indent Prevent the default indentation
Report bugs at https://github.com/aiham/filetree.js/issues
Run the tests. Uses: mocha, chai, sinon
npm test
FAQs
Recursively list files in directory hierarchy as a readable tree upto specified depth while excluding unwanted folder names
The npm package filetree.js receives a total of 0 weekly downloads. As such, filetree.js popularity was classified as not popular.
We found that filetree.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.