Re: How to deal with long pathnames in Cocoa ?
Re: How to deal with long pathnames in Cocoa ?
- Subject: Re: How to deal with long pathnames in Cocoa ?
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 16 Jan 2002 16:22:48 +0100
On Wednesday, January 16, 2002, at 04:17 PM, Lance Bland wrote:
On Wednesday, January 16, 2002, at 09:57 AM, Ondra Cada wrote:
I've just tried that in my NeXTStep
3.3, and succeeded to kill Edit the very same way -- by trying to save
a file
into path longer than 1024 characters).
Do please file a bugreport.
Look at the file /usr/include/sys/syslimits.h
and this line:
#define PATH_MAX 1024 /* max bytes in pathname */
and you will understand.
This limit is known by everyone I think. The issue is more how are we
supposed to deal with it when it's possible to have pathname bigger than
PATH_MAX and calling [NSFileManager defaultManager] fileExistAtPath (or
another one) would not be working.
One solution could be to use - changeCurrentDirectoryPath: to avoid the
1024 limits and use relative path names everywhere. But this does not
look like a realistic solution.