> ## Documentation Index
> Fetch the complete documentation index at: https://luau.limerence.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> api.utility: signal connect and assets.

A few convenience helpers. For unload callbacks, see [api.onUnload](/api/overview#onunload).

## Methods

| Method                           | What it does                                           |
| -------------------------------- | ------------------------------------------------------ |
| [connect](/utility/connect)      | Connect to a Roblox signal, auto-disconnects on unload |
| [getAsset](/utility/get-asset)   | Grab one asset Limerence has loaded                    |
| [getAssets](/utility/get-assets) | All assets of a type, or every category                |
| `loadArchive`                    | Unpack an archive so you can read its files            |

```luau theme={null}
api.utility.connect(someSignal, handler)
local icon = api.utility.getAsset("image", "pencil")
```

## loadArchive

```luau theme={null}
api.utility.loadArchive(archive: string | buffer, archiveType: ("Tar" | "Zip")?): FileArchive
```

Unpack an archive so you can read its files. Pass the raw archive data (string or buffer) with type `"Tar"` or `"Zip"`, or a folder path with no type. Returns a [FileArchive](/reference/types#filearchive). Removed when your script unloads.

The `FileArchive` you get back:

| Member            | What it does                                                                            |
| ----------------- | --------------------------------------------------------------------------------------- |
| `path`            | Folder on disk where the contents were unpacked.                                        |
| `readFile(path)`  | Returns the contents of a file inside the archive, e.g. `readFile("config/data.json")`. |
| `listFiles(path)` | Returns the file paths inside a folder of the archive.                                  |
| `isFile(path)`    | Whether the path is a file in the archive.                                              |
| `isFolder(path)`  | Whether the path is a folder in the archive.                                            |

```luau theme={null}
local archive = api.utility.loadArchive(game:HttpGet("https://example.com/pack.zip"), "Zip")
if archive:isFile("readme.txt") then
    print(archive:readFile("readme.txt"))
end
```

## configLoaded

```luau theme={null}
api.utility.configLoaded -- ApiSignal<string>
```

Signal fired with `(name)` when the user loads a config (from file or cloud). Re-read your control values here if you cache them. Disconnects on unload.

```luau theme={null}
api.utility.configLoaded:Connect(function(name)
    print("config loaded:", name)
end)
```
