• 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: Getting path to ~/Library/Application Support/
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting path to ~/Library/Application Support/


  • Subject: Re: Getting path to ~/Library/Application Support/
  • From: Jim Correia <email@hidden>
  • Date: Sun, 16 Dec 2001 19:52:09 -0500

On Sunday, December 16, 2001, at 06:02 PM, Enigmarelle Development wrote:

What's the best way to get the path to the user's Application Support Folder? Currently I'm using the below code, but I'm not sure if it's reliable in all cases.

NSArray *libraryDirectories = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, FALSE);

NSString * appSupportFolder = [[libraryDirectories objectAtIndex: 0 ] stringByAppendingString:(NSString *)@"/Application Support/"];

I don't know if there is a localizable answer, or if it is even an issue (are those paths localized on non-english systems?). However, you should probably use stringByAppendingPathComponent instead of stringByAppendingString since it deals with the prescense of extra path separators, or none, transparently and the resulting string should be correct in both instances.

Jim


  • Follow-Ups:
    • Re: Getting path to ~/Library/Application Support/
      • From: "Clark S. Cox III" <email@hidden>
References: 
 >Getting path to ~/Library/Application Support/ (From: Enigmarelle Development <email@hidden>)

  • Prev by Date: Re: Getting path to ~/Library/Application Support/
  • Next by Date: Re: is [uiObject display] necessary?
  • Previous by thread: Re: Getting path to ~/Library/Application Support/
  • Next by thread: Re: Getting path to ~/Library/Application Support/
  • Index(es):
    • Date
    • Thread