in reply to Re: File::Find won't iterate through CIFS share withouth "dont_use_nlink"
in thread File::Find won't iterate through CIFS share withouth "dont_use_nlink"

The optimization only helps if you have empty directories (i.e. directories with no files except . and ..)
Erm, actually the optimisation is used to detect directories that contain no subdirectories (rather than that are empty directories). That way, for leaf node directories, you don't have to stat() every directory entry looking for possible subdirectories.

Dave.

  • Comment on Re^2: File::Find won't iterate through CIFS share withouth "dont_use_nlink"

Replies are listed 'Best First'.
Re^3: File::Find won't iterate through CIFS share withouth "dont_use_nlink"
by ikegami (Patriarch) on Feb 02, 2017 at 17:17 UTC

    Oops, yeah.

    Ironically, the information stat is used to fetch is provided by the native equivalent of readdir in Windows, so using the native call instead of readdir would gain the effect of the optimization, and not just for leaf directories!