How can i make a spotlight with path light?

i know how to use setWorldRotation, but how can i use it like a light house, as i know, it works like a sun light, not a limited light with light path. is there any option for it?