Skip to content

Instantly share code, notes, and snippets.

View autoxr's full-sized avatar

Mike Shields autoxr

  • USA
  • 04:30 (UTC +01:00)
View GitHub Profile
+ (BOOL)_copyPathWithForcedAuthentication:(NSString *)src toPath:(NSString *)dst error:(NSError **)error
{
NSString *tmp = [self _temporaryCopyNameForPath:dst];
const char* srcPath = [src fileSystemRepresentation];
const char* tmpPath = [tmp fileSystemRepresentation];
const char* dstPath = [dst fileSystemRepresentation];
struct stat dstSB;
stat(dstPath, &dstSB);
- (BOOL)getRoot
{
OSStatus err = errAuthorizationSuccess;
if (!_authRef)
{
AuthorizationItem item[1];
AuthorizationFlags authFlags = kAuthorizationFlagDefaults;
AuthorizationRights authRights;
authRights.count = 0;
2013-04-22 10:16:50.182 hazelworker[95421] File Episode 6_ Epcot Resorts.mp3 has been sitting in the trash for too long. Purging.
2013-04-22 10:16:50.182 hazelworker[95421] Removing Episode 6_ Epcot Resorts.mp3.
2013-04-22 10:16:50.182 hazelworker[95421] [Trash Event] File purged from Trash: File Episode 6_ Epcot Resorts.mp3 has been sitting in the Trash for too long and has been deleted.
2013-04-22 10:16:50.189 hazelworker[95421] Error getting hidden status of file /Volumes/Media/.Trashes/501/Episode 6_ Epcot Resorts.mp3: Error Domain=NSCocoaErrorDomain Code=260 "The file “Episode 6_ Epcot Resorts.mp3” couldn’t be opened because there is no such file." UserInfo=0x10069aab0 {NSURL=file://localhost/Volumes/Media/.Trashes/501/Episode%206_%20Epcot%20Resorts.mp3, NSFilePath=/Volumes/Media/.Trashes/501/Episode 6_ Epcot Resorts.mp3, NSUnderlyingError=0x106222a40 "The operation couldn’t be completed. No such file or directory"}
2013-04-22 10:16:50.189 hazelworker[95421] Error creating FSRef for path /Volumes/Media/.
### Keybase proof
I hereby claim:
* I am autoxr on github.
* I am autoxr (https://keybase.io/autoxr) on keybase.
* I have a public key ASAQD3jHVoG123qnyAjIHlt79NU3IN0l9lBZlxHURKj-2Qo
To claim this, I am signing this object: