13.3 Default Name Space for Path and File Names

By default, the LibC interfaces use the LONG name space. This name space allows for long names (up to 255 characters) and case is ignored. If your application is interacting with a system where case is significant (Linux or UNIX), you can set the default name space to NFS_NAMES, which causes the interfaces to treat case as significant in all paths. You can us the following functions in fsio.h to manage name space.

Function

Description

fgetstat_with_namespace

Obtains selected information about an open file, in the requested name space. You can use this function to return a path in a name space that is different than the thread's default name space.

getstat_with_namespace

Retrieves selected information about file or directory, in the requested name space. You can use this function to return a path in a name space that is different than the thread's default name space.

set_pathname_format

Sets the name space for the pathname format of the calling thread. If your application is multithreaded, each thread must set the name space.

Once set, standard functions such as stat return path information in the name space you have set. Input path parameters must also be in this name space.