Is possible to write a code block of the node Directory from path?
yes, this calls the same function that the node will call. you can see that here:
the node is going to have file watching capability that calling it directly will not though.