![]() |
![]() |
![]() |
Return the pathname associated with an ID
#include <sys/resmgr.h> int resmgr_pathname( int id, unsigned flags, char* path, int maxbuf );
libc
The resmgr_pathname() function returns the pathname associated with an id that's returned from resmgr_attach(), it's also the ctp->id value of all the resmgr callout functions.
By default, a globally unique pathname is returned, if flags is _RESMGR_PATHNAME_LOCALPATH then a shortened pathname only usable on the local machine is returned.
If the id was obtained from calling resmgr_attach() with _RESMGR_FLAG_DIR specified, then a trailing slash is returned from this function.
This function calls netmgr_ndtostr(ND2S_DIR_SHOW, nd, buf, sizeofbuf) by default, but when _RESMGR_PATHNAME_LOCALPATH is specified it calls netmgr_ndtostr(ND2S_DIR_SHOW|ND2S_LOCAL_STR, nd, buf, sizeofbuf) to return a shortened path that's usable on your local node only. This is useful for display.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |