I was wondering if the program is a way to clear the contents of the trash bin. I am currently deleting files that are located at:
NSFileManager * manager = [NSFileManager defaultManager]; [Remove the manager ItemAtPath: fileToDelete error: zero]; However, when I use this operation, every time I drag a file into the trash, I get a message from the message:
< P> Are you sure you want to delete it "xxxxxx.xxx" This item will be removed immediately. You can not undo this action It runs until I log out or sudo rm -rf trash bin
< Div class = "post-text" itemprop = "text">
You can put stuff in the garbage, though it can be removed, there is not a number for garbage programs, so that you can not find an API. So your best bet is using scriptbridge.
Add ScriptingBridge.framework to your build target, and generate the header file for the searcher: SDEF / System / Library / Core Services / Finder / | Sdp -fh --basename finder Then you can ask the searcher to prompt the user to clear garbage:
#import " Finder.h "Finder App * Finder = [Bundle Indentifier with SBApplication Application: @" com.apple.Finder "]; // Active Finder [Finder Active]; // Wait a moment (do not activate immediately), then the current warning message send_adm (Dispatch_time (DISPATCH_TIME_NOW, (int64_t) (0.1 * NSEC_PER_SEC)), sending_out_man_qua (), ^ {[empty security security: security];}); See for more information.
As Xcode 7.3, if you try with Swift, you should find the Finder. So you have to make a purpose-cover.
Comments
Post a Comment