3

In node JS, for a display of files, I would like to get the icon windows will use for a file.

Similarly to how chrome will show the correct icon considering the local handler. For example, when downloading a .psd file, when Photoshop is installed chrome will show the Icon assigned by photoshop.

I can only think of manually checking the classes in registry, but is there a better way?

Is there any way to query the OS in order to find a suitable icon?

Thanks.

Selfish
  • 6,023
  • 4
  • 44
  • 63
  • 1
    Not without native bindings. Invoking Regedit to read the values is probably your best bet. – Aurelia Aug 25 '16 at 09:36
  • its a long process you dont want to get into, you can do this by calling writing node c++ code addon, to read your .dll files and match it with your file extension. its very platform specific hence its just a headache. – Bamieh Aug 25 '16 at 09:41
  • Thank you both for the comments, I'm surprised there isn't a package for this, might create it, as I do need the functionality. – Selfish Aug 25 '16 at 10:41

0 Answers0