This example shows how to set the the node image file based on the data. There are two folder icons, one for folders with expanded children and one for folders with no (expanded) children. In addition the link width shows the file/ folder size
Acknowledgements: