Gimp.Path.get_user_writable_dir

function get_user_writable_dir(path: Array(String)): String {
    // Gjs wrapper for gimp_path_get_user_writable_dir()
}
  

Note that you have to g_free() the returned string.

path

A list of directories as returned by Gimp.Path.parse.

Returns

The first directory in path where the user has write permission.