GLib.path_get_dirname

function path_get_dirname(file_name: String): String {
    // Gjs wrapper for g_path_get_dirname()
}
  

Gets the directory components of a file name.

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

file_name

the name of the file

Returns

the directory components of the file