site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=KSYldUMlECzV7TZqbwbWZzdaiDebpqiasHYwAwlPUVg=; b=U9aO9Mr0qt3l/rN7TuWi8fmqlVWzGv6X6gSxZ1rjZQC0t+GCM7UHCpbpzzR7rqW4qn P22gNlDOjL9I6DTGrid1MtVFkLb7MXQkBH0/BJcptE1reWL+yQCXE8kLtzeJfY3RnqkW WsXTr9I0AurG9AOZfrYKr6ftDAvYxYe8nh+FY= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=G9j3PyVwPrVop9Qf/FNSKeaT5h9Va2g9Vp20/8ZV6f43NYPbvWZPdXhsYDP3szSP0p Wf0/tfZS6EzPCdZDaQEXigKblj/hRqAq2Ic1zoRQD8HNld20HtOPTpgsI5dzKDWEn0aq +eflB7vS+aGU7xIkO/ofPAZsrfr8eikY2uvug= Hello All, The file /usr/lib/charset.alias is identified by FSIsAliasFile() as an alias file. However, when I try to resolve it using FSResolveAliasFile() it fails to resolve. Below is the code : #include<stdio.h> #include "/Developer/Headers/FlatCarbon/Aliases.h" int main(int argc,char *argv[]) { FSRef fileRef; Boolean aliasFileFlag, folderFlag,targetIsFolder,wasAliased; FSRef theRef; char path[255]; int i=0; int x; FSPathMakeRef((UInt8 *)argv[1],&fileRef,NULL); FSPathMakeRef((UInt8 *)argv[1],&theRef,NULL); FSIsAliasFile(&fileRef, &aliasFileFlag, &folderFlag); if(aliasFileFlag == TRUE) printf("Alias file\n"); else { if(folderFlag == 1) printf("Folder\n"); else printf("File\n"); return 0; } x = FSResolveAliasFile(&theRef,TRUE,&targetIsFolder,&wasAliased); if (x) printf("failed\n"); if(targetIsFolder == TRUE) printf("Target is Directory\n"); else printf("Target is file\n"); FSRefMakePath(&theRef,path,255); printf("\"%s\" points to \"%s\"\n",argv[1],path); return 0; } This code works for all other files. What might be the issue ? The output of GetFileInfo does not indicate that the file is an alias. /Developer/Tools/GetFileInfo /usr/lib/charset.alias file: "/usr/lib/charset.alias" type: "" creator: "" attributes: avbstclinmedz created: 04/01/1976 15:30:38 modified: 01/30/2006 13:41:33 Thanks _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com