Apparently Apple changed something with Sierra, because I can't seem to get .Trashes to work merely by creating a directory of that name (see
https://github.com/osxfuse/osxfuse/issues/246). Meaning, if you try to delete a file from within Finder, you will get a warning saying that the file will be deleted permanently. Instead, I would like those files to be moved to .Trashes just like any other OSX volume.
I did a little investigating and saw that Finder, upon clicking "Move to Trash" from the context menu, will call stat() on the .Trashes folder, but no matter how much I try to duplicate the same statbuf as the native .Trashes/ folder, I don't seem to be successful at foolin' Finder.
Any thoughts?