FileManager subpathsOfDirectory not finding all folders

I have just spent an amusing hour or two trying to track down why my app couldn't find a certain subfolder of a folder I had already enumerated.

In the end I found that subpathsOfDirectory wasn't finding some folders, whereas, in the end, I found using subpaths correctly listed all subfolders.

Any ideas why?
Can you be more specific?
I do not understand what is working and what is not working reading your post?

Can you show some code which we can run and examine and explain what is the expected result and clarify the difference from what you actually get?
FileManager subpathsOfDirectory not finding all folders
 
 
Q