# File System

The File System API provides structured access to addon-specific filesystem paths.

It is used to store data, logs, and cache in a consistent OMS layout.

***

### Overview

The File System is responsible for:

* providing scoped paths per addon
* organizing data into predefined categories
* ensuring paths exist when accessed

All paths are managed through `AddonPaths`.

***

### Core Types

#### AddonPaths

`AddonPaths` provides access to filesystem directories associated with an addon.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/infrastructure/file/AddonPaths.kt>" %}

***

#### AddonPathType

`AddonPathType` defines categories of paths used by OMS.

{% @github-files/github-code-block url="<https://github.com/c0nnor263/OperateMyServer/blob/main/oms-api/src/main/kotlin/io/conboi/oms/api/infrastructure/file/AddonPathType.kt>" %}

***

### Usage

Addon paths are used to:

* store persistent data
* write logs
* manage cache and temporary files

Feature-specific paths can be obtained using `forFeature`.

***

### Notes

* Paths are scoped per addon
* Directories are created lazily
* Structure is controlled by OMS
* Cache data may be safely removed
* Features may use dedicated subpaths


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://conboi.gitbook.io/oms-wiki/developer-guide/runtime-infrastructure/file-system.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
