1.0.0 • Published 6 months ago

pathlet v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

pathlet

Using this package you can find files and get their paths.

Installation:

  • Install package globally npm i -g pathlet or npm 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.