[quote='809127022, DTS Engineer, /thread/766035?answerId=809127022#809127022']
SO, my immediate question is why are you calling getattrlistbulk?
[/quote]
I think I switched to getattrlistbulk many years ago for performance reasons. Perhaps I didn't test correctly at the time, or perhaps FileManager became faster in the meantime... in any case, I cannot switch back just yet because of some missing or unsupported URLResourceKey values. fileIdentifierKey for instance is only available since macOS 13.3 and iOS 16.4, and it was only added because I opened a feedback about it (or it was coincidentally added at the same time).
I think your attributeBuffer is FAR to small:
(I would keep quoting you like above, but it seems that multiple quotes are not rendered correctly, so I have to resort to the Markdown quote syntax)
Thanks for pointing that out. I increased it to 32 * 1024 as suggested...
If your "ATTR_CMN_NAME" parsing fails in the right name, then you'll end up returning "parent path" as the new file full path. You'll then recurse on exactly the same directory.
... but still, even though your explanation makes sense, it cannot be the cause here. If any file name failed to parse in my original code and resulted in the parent directory being scanned again, the output would show start scan [...] which is not the case here. Instead, getattrlistbulk just continues by listing files we've already seen.
I did take a look at your attachment, but I think something was completely broken in the upload process, garbling the file to the point where I couldn't really get it working.
Here I try to upload the code again.
ViewController.swift