My intention is to create a drop folder and its content file programatically. When the user browse a input file of his choice from a directory, i want to copy it to a drop folder inside the node directory. But i am not getting the node directory path while configuring?
Anybody have any suggestions please...when we are developing a custom node, we should get/know the node directory path,right? I think it is not exposed outside the core plugin..am i missing something?
If you want only the directory name in return and not the full path, then you can use this function:
function getCurrentDirectoryName() { var fullPath = __dirname; var path = fullPath.split(’/’); var cwd = path[path.length-1]; return cwd; }