Fixed not fully working requires in dir based functions like file.directory or file.recurse
Merge pull request #18579 from spuzirev/fix-file-directory-require

Fixed not fully working requires in dir based functions like file.direct...