Re: Absolute Paths
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.