I noticed when attempting to delete an enumerated folder with didDeleteItems, passing only the top-level folder's ID is not enough to delete the item.
I'm very confused by what you mean here. Why are "you" calling didDeleteItems? That method is how the system tells your extension what the user "did", not how you tell the system what your server did.
As side note here, keep in mind that only passing in the "top level" item is an ENORMOUSLY beneficial performance optimization. In the context of virtually every file system I'm aware of, it is not in fact possible to "delete a directory". More specifically, the act of deleting a full directory hierarchy requires recursively visiting the entire hierarchy, individually deleting each file, then deleting each directory record once the record is empty. Fundamentally, each object has it's own record and there isn't any "shortcut" that would allow "bulk" record removal. That just isn't how file systems work. The optimization here is that the system is aware that you're maintaining a logical hierarchy that may support higher level operations that the underlying (physical) file system does.
Similarly, what you're saying here:
It seems we need to pass all items underneath as well to this function for the folder to be removed.
The system called "didDeleteItems" when it deleted the data "it" had. How the effected YOUR server is entirely up to you. Typically you'd respond by "deleting" your servers data, but there's certainly no requirement that you do so and I can think of many cases where you would NOT do so.
Is there a way around this?
No? As I said, didDeleteItems doesn't actually "do" anything and it's still not clear what you're actually expecting here and why.
The way our application is designed makes it challenging to do this and we would prefer being able to remove the folder by utilizing the item ID only.
Why? Architeturally, I'd expect you file provider to already be maintaining it's own independant state structure tracking everything it's storing, totally independent of the file system. That structure is what it then uses to reconcile changes to and from the server, as well as "exporting" the system/user whenever the system asks for it.
Similalry, this question is very confusing:
If not, how could we obtain the particular items underneath that should be passed in to
the function?
Which items? Are you talking about the nested items that happen to be in the working set?
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware