1.0.0 • Published 6 months ago
pathlet v1.0.0
pathlet
Using this package you can find files and get their paths.
Installation:
- Install package globally
npm i -g pathlet
ornpm i pathlet
code example:\
require package as get_file_location and use
const get_file_location = require('pathlet'); get_file_location(filename, (error, result) => { if (error) { console.error(error); } else { console.log("File Location:", result); } });
Input and output:
Input
get_file_location('computer.js', (error, result) => { if (error) { console.error(error); } else { console.log("File Location:", result); } });
Output
File Location: /home/suraj/Desktop/packages/finder-cli/computer.js File Location: /home/suraj/Desktop/packages/finder-cli/com/computer.js
Usage:
- if you are in Desktop directory and search a specific file it will find all files of that exact name with extension in Desktop and all of its subdirectorires.
1.0.0
6 months ago