file-icon-extractor
Extract icons from files.
Installation
$ npm i file-icon-extractor
Usage
const icon = require('file-icon-extractor');
icon.extract(filePath, destinationPath, format);
parameter | explanation |
---|---|
filePath |
A valid file path (string) or array of file paths for the file(s) you wish to fetch icon(s) from. |
destinationPath |
Where you want to save the output image (directory). |
format (optional) |
Output image format. (png, jpeg, gif, etc.) Default is png. |
Quick Start
const icon = ; // Extract singluar iconicon;
const icon = ; var programs = "C:\\Users\\USERNAME\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe" "C:\\Users\\USERNAME\\AppData\\Local\\slack\\slack.exe" // Extract mutiple icons (as jpeg)icon;
Support
Platform | Details |
---|---|
Windows: | Support has been tested and confirmed on Windows as of v1.0.4 for any filetype with an icon association in explorer , this includes .exe files. |
Linux: | Theoretically support should exist; however, as of v1.0.4 this has not yet been thoroughly tested. |
Mac OS: | Theoretically support should exist; however, as of v1.0.4 this has not yet been thoroughly tested. |
Issues
Please submit any issues through the issues tab on GitHub.