• 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: "First Run" installation of Application support stuff?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "First Run" installation of Application support stuff?


  • Subject: Re: "First Run" installation of Application support stuff?
  • From: Andreas Mayer <email@hidden>
  • Date: Mon, 9 Dec 2002 00:39:04 +0100

Am Sonntag, 08.12.02 um 22:08 Uhr schrieb Jeff Disher:

I think that this is a good idea. If I weren't in exams right now I would write up a quick framework with something like that since it is very useful.

What are you talking about?

Finding the Application Support Folder?

I use this:


#import <Foundation/Foundation.h>


@interface NSFileManager (AMAdditions)

- (NSString *)findSystemFolderType:(int)folderType forDomain:(int)domain;

@end


#import "NSFileManagerAMAdditions.h"

//kUserDomain
//kApplicationSupportFolderType
//kCurrentUserFolderType
// more in CarbonCore/Files.h


@implementation NSFileManager (AMAdditions)

- (NSString *)findSystemFolderType:(int)folderType forDomain:(int)domain
{
FSRef folder;
OSErr err = noErr;
CFURLRef url;
NSString *result = nil;

err = FSFindFolder(domain, folderType, false, &folder);

if (err == noErr) {
url = CFURLCreateFromFSRef(kCFAllocatorDefault, &folder);
result = [(NSURL *)url path];
}

return result;
}

@end

NSString *applicationSupportFolder = [[NSFileManager defaultManager] findSystemFolderType:kApplicationSupportFolderType forDomain:kUserDomain]


bye. Andreas.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "First Run" installation of Application support stuff?
      • From: Jeff Disher <email@hidden>
    • Re: "First Run" installation of Application support stuff?
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: rotating arrows
  • Next by Date: responder chain madness...
  • Previous by thread: Re: "First Run" installation of Application support stuff?
  • Next by thread: Re: "First Run" installation of Application support stuff?
  • Index(es):
    • Date
    • Thread