icons-base64
v2.0.5
Published
Retrieve system file or folder icons
Downloads
31
Readme
WIN-ICONS
A nodejs package that returns win base64 image data for a path's icon.
Asynchronous retrieval of file or folder icons
var { WinDefaultIcons } = require('icons-base64');
const defaultIcons = new WinDefaultIcons()
defaultIcons.getIcon("C:\\Users\\TATO\\Documents").then(data=>{
console.log(data)
})Synchronize to retrieve file or folder icons
var { WinDefaultIcons } = require('icons-base64');
const defaultIcons = new WinDefaultIcons()
const startTime = new Date().getTime()
for(let i=0;i<1000;i++){
const str = defaultIcons.getIcon("C:\\Users\\TATO\\Documents");
}
console.log(new Date().getTime() - startTime)PIPO to retrieve file or folder icons (Faster)
var { WinPIPOIcons } = require('icons-base64');
const pipoInons = new WinPIPOIcons()
const startTime = new Date().getTime()
pipoInons.emitter.on('icon', function(data){
if(data.context == 999){
console.log(new Date().getTime() - startTime)
}
});
for(let i=0;i<1000;i++){
pipoInons.getIcon(i, "C:\\Users\\TATO\\Documents");
}