Function

GLib-2.0GLibpath_get_dirname

  • Gets the directory components of a file name. For example, the directory component of /usr/bin/test is /usr/bin. The directory component of / is /.

    If the file name has no directory components "." is returned. The returned string should be freed when no longer needed.

    Parameters

    • file_name: string

      the name of the file

    Returns string

    the directory components of the file