TotallyInformation / node-red-contrib-fs

Node-Red node template for host filing system handling
Apache License 2.0
15 stars 6 forks source link

Return something if nothing found #7

Closed werling closed 5 years ago

werling commented 6 years ago

Hello,

im using this node for listing specific files in a folder. The flow works if there are files in the folder, then the node outputs the files. But if there are no files in the folder, the flow doesn't work because nothing is outputted.

Is this by design? How could i change it?

TotallyInformation commented 6 years ago

Hi, this is somewhat by design since if you don't find anything, you don't usually want to trigger anything downstream.

If you wanted to contribute a Pull Request, I'd suggest either making it an option in the settings (defaulted to off) or adding a secondary output so that existing users of the node are not impacted.

werling commented 6 years ago

Hi, thanks for your answer. Unfortunately i'm note very fit in java script and/or nodejs. I did a workaround by using the trigger node, which will only be executed if the fs node is sending nothing.

TotallyInformation commented 6 years ago

Not to worry, I will leave this open to pick up when next I get chance to look at it or if someone else wants to pick it up. Thanks for the input.

TotallyInformation commented 5 years ago

Feature added to v1.1.0 shortly to be published.