QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
What is the maximum size of a filename (including path)? |
Ref. No. |
QNX.000009345 |
Category(ies) |
Development |
Issue |
What is the maximum size of a filename (including path)?
|
Solution |
You can use fpathconf() to ask the filesystem what the values are.
You also should be able to find this information in limits.h :
#define _POSIX_PATH_MAX 255 /* Num. bytes in pathname (excl. NULL) */ #define _POSIX_NAME_MAX 14 /* Max bytes in a filename */ #define NAME_MAX 48 /* QNX allows this */
But, if you are dealing with a file system supplied by Dosfsys (for example) this will be different -- in that case, the filename is restricted to 8.3.
|
|