Gio.io_modules_load_all_in_directory_with_scope
Description: Reference for Gio.io_modules_load_all_in_directory_with_scope

### Function

# Gioio_modules_load_all_in_directory_with_scope

since: 2.30

#### Declaration [src]

    GList*
    g_io_modules_load_all_in_directory_with_scope (
      const gchar* dirname,
      GIOModuleScope* scope
    )

#### Description [src]

Loads all the modules in the specified directory.

If don’t require all modules to be initialized (and thus registering all gtypes) then you can use `g_io_modules_scan_all_in_directory()` which allows delayed/lazy loading of modules.

Available since: 2.30

#### Parameters

`dirname`

  Type: `const gchar*`

  Pathname for a directory containing modules to load.

  The data is owned by the caller of the function.
  The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows.

`scope`

  Type: `GIOModuleScope`

  A scope to use when scanning the modules.

  The data is owned by the caller of the function.

#### Return value

Type: A list of `GIOModule*`

A list of `GIOModules` loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call `g_type_module_unuse()` on all the modules. Free the list with g_list_free().

The caller of the function takes ownership of the data, and is responsible for freeing it.