All of your logic must be contained within the run step itself. The CircleCI config is parsed yaml which is fed to a processor for the run tasks. The run task itself may contain a bash script for instance which would loop through what actions you need to take.
Theoretically you could have one workflow per directory you wish to monitor, then have a main workflow which is responsible for finding out what directory has been modified call the correct workflow trigger via the API.