• 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
Re: NSApplicationSupportFolder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplicationSupportFolder


  • Subject: Re: NSApplicationSupportFolder
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 27 Dec 2004 14:03:24 -0500

Shaun Wexler (email@hidden) on Mon, Dec 27, 2004 1:36 PM said:

>I think you have to hand-enter the non-localized string, such as:
>
>- (NSArray *)applicationSupportPaths
>{
>	NSArray *searchPaths =
>NSSearchPathForDirectoriesInDomains(NSLibraryDirectory,
>NSUserDomainMask + NSLocalDomainMask, YES);
>	NSMutableArray *applicationSupportPaths = [NSMutableArray
>arrayWithCapacity:[searchPaths count]];
>	NSString *executableName = [[[NSBundle mainBundle] executablePath]
>lastPathComponent];
>	NSString *pathComponent = [NSString stringWithFormat:@"Application
>Support/SKW Development/%@", executableName];

Hard coding paths is very bad.  "Application Support" may change names in
the future.  Using the FSFindFolder API is best and safest.  See:

<http://developer.apple.com/documentation/Cocoa/Conceptual/
LowLevelFileMgmt/Tasks/LocatingDirectories.html>


--
"First they ignore you, then they attack you, then you win."


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSApplicationSupportFolder
      • From: BK <email@hidden>
References: 
 >Re: NSApplicationSupportFolder (From: Shaun Wexler <email@hidden>)

  • Prev by Date: Re: coordinate transformation
  • Next by Date: Re: NSDecimal localization
  • Previous by thread: Re: NSApplicationSupportFolder
  • Next by thread: Re: NSApplicationSupportFolder
  • Index(es):
    • Date
    • Thread