/*-------------------------------------------------------------*/
/* Name : netwib_pathnametype_init
Description :
Get type of a pathname.
Input parameter(s) :
*ppathname : pathname
Input/output parameter(s) :
Output parameter(s) :
*ptype : type of the path
Normal return values :
NETWIB_ERR_OK : ok
NETWIB_ERR_OKFILENOTFOUND : file was not found
*/
typedef enum {
NETWIB_PATHNAMETYPE_UNKNOWN = 0, /* unknown type */
NETWIB_PATHNAMETYPE_REG, /* regular file */
NETWIB_PATHNAMETYPE_DIR, /* directory */
NETWIB_PATHNAMETYPE_LINK, /* link */
NETWIB_PATHNAMETYPE_SOCK, /* socket */
NETWIB_PATHNAMETYPE_BLOCK, /* block file */
NETWIB_PATHNAMETYPE_CHAR, /* char file */
NETWIB_PATHNAMETYPE_FIFO /* fifo */
} netwib_pathnametype;
netwib_err netwib_pathnametype_init(netwib_constbuf *ppathname,
netwib_pathnametype *ptype);
/*-------------------------------------------------------------*/
/* Name : netwib_pathname_exists
Description :
Check if a path exists.
Input parameter(s) :
*ppathname : pathname
Input/output parameter(s) :
Output parameter(s) :
*pyes : if path exists
Normal return values :
NETWIB_ERR_OK : ok
*/
netwib_err netwib_pathname_exists(netwib_constbuf *ppathname,
netwib_bool *pyes);