Gets the directory components of a file name. For example, the directory
/usr/bin. The directory component of
If the file name has no directory components “.” is returned. The returned string should be freed when no longer needed.
The name of the file.
The data is owned by the caller of the function. The value is a file system path, using the OS encoding.