Got a problem for how to determine file/folder in trash.
There’s some solution on Internet, one of those is FSFindFolder.
which can be used something like this:
FSFindFolder(kUserDomain, kTrashFolderType, true, &trashRef);
but still don’t know how to pass the path of file that I want to determine using this method
The last parameter of
FSFindFolderis aFSRef, which can be converted to aCFURLRefand to aNSURL:(I have omitted the error checking for sake of brevity. I have also assumed that you use automatic reference counting.)
Now you can check if a given file is in the trash folder:
NOTE: On Mac OS X 10.8,
FSFindFolderis deprecated, and you can use the following code to find the trash folder: