Download cpython_2/environment/repo/Mac/BuildScript/seticon.m from lolbench26/LoLBench: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Mac/BuildScript/seticon.m
- Command line
-
hf download hf://datasets/lolbench26/LoLBench/cpython_2/environment/repo/Mac/BuildScript/seticon.m
-
curl -L -o seticon.m https://huggingface.co/datasets/lolbench26/LoLBench/resolve/main/cpython_2/environment/repo/Mac/BuildScript/seticon.m
598 Bytes
| /* | |
| * Simple tool for setting an icon on a file. | |
| */ | |
| #import <Cocoa/Cocoa.h> | |
| #include <stdio.h> | |
| int main(int argc, char** argv) | |
| { | |
| if (argc != 3) { | |
| fprintf(stderr, "Usage: seticon ICON TARGET"); | |
| return 1; | |
| } | |
| NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
| NSString* iconPath = [NSString stringWithUTF8String:argv[1]]; | |
| NSString* filePath = [NSString stringWithUTF8String:argv[2]]; | |
| [NSApplication sharedApplication]; | |
| [[NSWorkspace sharedWorkspace] | |
| setIcon: [[NSImage alloc] initWithContentsOfFile: iconPath] | |
| forFile: filePath | |
| options: 0]; | |
| [pool release]; | |
| return 0; | |
| } | |