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

Re: Absolute Paths


  • Subject: Re: Absolute Paths
  • From: Ondra Cada <email@hidden>
  • Date: Sun, 26 May 2002 11:34:19 +0200

On Sunday, May 26, 2002, at 03:37 , RR wrote:

I don't know if there's a Cocoa magic bullet for you here, but you could choose to do this using the Unix system call getcwd().

[[NSFileManager defaultManager] currentDirectoryPath]

No "free" needed, no MAXPATHLEN problems(*), standard NSString result.

Also, for getting absolute paths I'd use something like

for (enum=[fmanager enumeratorAtPath:path];file=[enum nextObject];) {
file=[path stringByAppendingPathComponent:file];
...
}

(*) Actually there _are_ pathlen problems currently AFAIK, but *in libraries*, and thus they will be automagically fixed as soon as Apple fixes them; otherwise, if you hardcoded MAXPATHLEN, you would have to recompile.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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: Absolute Paths
      • From: Marcel Weiher <email@hidden>
References: 
 >Re: Absolute Paths (From: RR <email@hidden>)

  • Prev by Date: Re: Preference Pane Window
  • Next by Date: Re: Objective C language question: Making init like a contrustor
  • Previous by thread: Re: Absolute Paths
  • Next by thread: Re: Absolute Paths
  • Index(es):
    • Date
    • Thread