Как обновить окно поиска?
Я хочу обновить значок для определенного файла / папки в приложении Finder.
FNNotifyByPath( (const UInt8 *)folderPath, kFNDirectoryModifiedMessage, kNilOptions );
FNNotifyByPath
не работает для этого. Теперь я пытаюсь с AppleScript
+(void) refreshIconForItem : (NSString *)itemPath
{
NSString *source=[NSString stringWithFormat:@"tell application \"Finder\" to update \"%@\"",[NSString stringWithUTF8String:itemPath]];
NSAppleScript *update=[[NSAppleScript alloc] initWithSource:source];
NSDictionary *err;
[update executeAndReturnError:&err];
}
но эта функция тоже не работает.
Кто-нибудь может помочь мне?