## Extension Extension |

## Functions

| versionCheck ()
| versionLeq ()
Gio.File | findExtensionSubdirectory ()

## Functions

### versionCheck ()

    versionCheck (required,
                  current);

Check if a component is compatible for an extension. `required` is an array, and at least one version must match. `current` must be in the format <major>.<minor>.<point>.<micro> <micro> is always ignored <point> is ignored if not specified (so you can target the whole release) <minor> and <major> must match Each target version must be at least <major> and <minor>

#### Parameters

required | an array of versions we're compatible with |
current | the version we have |

### versionLeq ()

    versionLeq (string   a,
                string   b);

#### Parameters

a | the first version |
b | the second version |

#### Returns

whether a <= b

### findExtensionSubdirectory ()

    Gio.File
    findExtensionSubdirectory (Gio.File   dir);

For extensions that are shipped with multiple versions in different directories, look for the largest available version that is less than or equal to the current running version. If no such version is found, the original directory is returned.

#### Parameters

dir | directory to search in |

#### Returns

directory object of the desired directory.