Any trailing '/' characters are not counted as part of the directory name.
If path is NULL, the empty string, or contains no '/' characters, the
path "." is placed into the result buffer.
@param path The path.
@param buffer A buffer to place the parent directory path into, or NULL.
@param n The length of the buffer.
@return The length of the parent directory path, or -1 on error
(errno will be set).
Obtain the parent directory of a specified path.
Any trailing '/' characters are not counted as part of the directory name. If path is NULL, the empty string, or contains no '/' characters, the path "." is placed into the result buffer.
@param path The path. @param buffer A buffer to place the parent directory path into, or NULL. @param n The length of the buffer. @return The length of the parent directory path, or -1 on error (errno will be set).