Skip to content Skip to sidebar Skip to footer

Node.js Fs Get Icon Of Files In Directory

I want to build a file system explorer app, and I want to list files with icons. I use node-webkit. And files can be executables, directories and normally files. In file list I wan

Solution 1:

Icons are dependent on the operating system / browser application and aren't a generic interface provided by node.js - you instead need to first resolve the type of file, then pick and show the icon for that type of file.

You can use the fs module for resolving the type - especially stats.

The type of icon to show is up to you - some operating systems may provide these for you, but it is up to you to find their location.

Post a Comment for "Node.js Fs Get Icon Of Files In Directory"