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

Re: createDirectoryAtPath problems


  • Subject: Re: createDirectoryAtPath problems
  • From: Hamish Allan <email@hidden>
  • Date: Wed, 5 Feb 2003 09:18:41 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

Your stringByExpandingTildeInPath is having no effect, it doesn't manipulate the string in place (you would need an NSMutableString for that)

Try:

NSString *directoryLocation = [[NSString stringWithFormat: @"~/Library/Application Support/DevKit"] stringByExpandingTildeInPath];

HTH,
Hamish

Hi,

I am trying to create a directory in ~/Library/Application Support
called DevKit.

Here is what I have done:

bool i;
NSString *directoryLocation = [[NSString alloc]
initWithFormat:@"~/Library/Application Support/DevKit/"];
[directoryLocation stringByExpandingTildeInPath];
NSFileManager *man = [NSFileManager defaultManager];
i = [man createDirectoryAtPath:directoryLocation attributes:nil];
NSLog(@"%@", i);

It keeps returning (null). What am i doing wrong?

Mat
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE+QNb16gc2d//pELYRAmTZAJ9ohErIw+vYvlBif2t26+mO4B0K9QCfZGFo
o4l5Cpytph9jg97oWsRVsSM=
=INDZ
-----END PGP SIGNATURE-----
_______________________________________________
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.

  • Prev by Date: Updating menu items in a status bar item
  • Next by Date: Re: Updated Cocoa documentation available
  • Previous by thread: Re: createDirectoryAtPath problems
  • Next by thread: Container views in custom IB palettes
  • Index(es):
    • Date
    • Thread