Clarification on clonefile / copyfile support of clone directories?

The man page of copyfile sates the following:

COPYFILE_CLONE [..] Note also that there is no support for cloning directories"

COPYFILE_CLONE_FORCE [...] Note also that there is no support for cloning directories: if a directory is provided as the source, an error will be returned.

Now the man page for clonefile:

> Cloning directories with these functions is strongly discouraged.  Use copyfile(3) to clone directories instead.

--

So am I to enumerate the content of a directory build subfolders along the way in the target destination and clone each file inside individually? If I recall NSFileManager seems to clone a large directory instantly (edit actually I remembered wrong NSFileManager does not do this. Finder seems to copy instead of clone as well).

On further inspection, clonefile states that it can do this, but it is discouraged. Interesting. I wonder why.

If src names a directory, the directory hierarchy is cloned as if each item was cloned individually. However, the use of clonefile(2) to clone directory hierarchies is strongly discouraged. Use copyfile(3) instead for copying directories.

P.S. - Forgive me if I posting this in the wrong category, I couldn't find a "category" in the list of available categories on these forums that seems appropriate for this question.

I just found that Quinn wrote about this a bit here: https://developer.apple.com/forums/thread/784446

I'm still unsure why the man page for one function directs you to use another function - but that man page says cloning directories is unsupported so I'm still a bit confused about the recommendation. Is cloning directories unsupported or strongly discouraged?

Basically I have to move off NSFileManager because it doesn't provide progress and it doesn't support cancelling. But I'd like to clone when possible for speed and to save the user disk space.

Clarification on clonefile / copyfile support of clone directories?
 
 
Q