I mean sure, I could implement this feature from scratch, but I would rather use built-in functionality if possible. I would probably try the Core Foundation version before implementing it myself.
Post
Replies
Boosts
Views
Activity
Nice find! I did not find that header documentation, but while writing a test case for the Feedback I did observe that behavior.
So clearly at least the docs need to be updated. But it seems like incorrect behavior to me because the identically named CFURLEnumerator option kCFURLEnumeratorIncludeDirectoriesPostOrder does work the way that you would expect.
You could make that argument for literally any function provided by the system.
Arguments against rewriting it myself:
Possibly my implementation would not be as good as what the Foundation engineers came up with.
It means assuming responsibility for maintaining that function (for instance, if anything causes it to break in the future).
It adds more code / more complexity to my codebase.