Re: iceberg...create FINDER ALIAS on install?
Re: iceberg...create FINDER ALIAS on install?
- Subject: Re: iceberg...create FINDER ALIAS on install?
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 28 Jul 2005 22:51:12 +0200
On jeudi, juillet 28, 2005, at 09:40 PM, Stéphane Sudre wrote:
- launch a self-made tool creating an Alias file: This can be done
using the source code at
http://homepage.mac.com/nathan_day/pages/source.html
This gives something like this:
#import <Foundation/Foundation.h>
#import "NDAlias+AliasFile.h"
void usage(void)
{
(void)fprintf(stderr, "%s\n","usage: bristow file alias ");
exit(1);
}
int main (int argc, const char * argv[])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
if (argc==3)
{
NSString * tFile;
tFile=[NSString stringWithUTF8String:argv[1]];
if (tFile!=nil)
{
NSFileManager * tFileManager;
tFileManager=[NSFileManager defaultManager];
if ([tFileManager fileExistsAtPath:tFile]==YES)
{
NSString * tAliasFile;
tAliasFile=[NSString stringWithUTF8String:argv[2]];
if (tAliasFile!=nil)
{
if ([tFileManager fileExistsAtPath:tAliasFile]==NO)
{
[[NDAlias aliasWithPath:tFile]
writeToFile:tAliasFile];
}
else
{
(void)fprintf(stderr, "file \"%s\" already
exists.\n",argv[2]);
exit(1);
}
}
}
else
{
(void)fprintf(stderr, "file \"%s\" does not
exist.\n",argv[1]);
exit(1);
}
}
}
else
{
usage();
}
[pool release];
return 0;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden