• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Having a hard time...FSIsAliasFile
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Having a hard time...FSIsAliasFile


  • Subject: Having a hard time...FSIsAliasFile
  • From: Mark Manes <email@hidden>
  • Date: Sat, 17 Feb 2007 19:03:10 -0800

Guys,

I have code that is pretty simple. It compiles and works with certain Alias files but others it returns no error and those alias files are said to not be an alias file--yet they are. The finder says they are. I say they are--yet this function continues to lie to me.

What am I missing?

Here is the code:
+ (BOOL) isFileAnAlias:(NSString *) fileName
{
FSRef ref;
Boolean aliasFileFlag;
Boolean folderFlag;
OSStatus error = 0;

NSLog(@"filename = %@",fileName);

NSString *homeDir = NSHomeDirectory();

NSString *location = [homeDir stringByAppendingFormat:@"/Desktop/% @",fileName];

NSLog(@"location = %@",location);

error = FSPathMakeRef((const UInt8 *)[location fileSystemRepresentation], &ref, NULL);
if (!error)
{
error = FSIsAliasFile(&ref, &aliasFileFlag, &folderFlag);
NSLog(@"error = %d",error);
NSLog(@"aliasFileFlag = %d",aliasFileFlag);
}


	return true;
}


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Having a hard time...FSIsAliasFile
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: Progressbar Question
  • Next by Date: NSOpenPanel instantly closing
  • Previous by thread: Re: Inserting lists into NSTextView
  • Next by thread: Re: Having a hard time...FSIsAliasFile
  • Index(es):
    • Date
    • Thread