If you are wondering on how to let jsTree show different context menu for different nodes, you are at the right place. Context menu appears when a user right-click on a node. Probably you already have seen on how to show a customise context menu on jsTree's node right click. if not please have a quick look at jsTree with Custom Context Menuthen come back here to see how you can show different right click menu based on different condition.
For example, if you want to allow your users to delete "files" but not "folders" (by hiding the "delete" option from the context menu for folders) or to show Create new file, create new folder option for folders but not for files, please see the example below.
In this example, you will also be able see how you can use different icons for different nodes and different nodes for leaf nodes.