> For the complete documentation index, see [llms.txt](https://docs.flatredball.com/flatredball/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flatredball.com/flatredball/api/flatredball/io/filemanager/fromfiletext.md).

# FromFileText

### Introduction

FromFileText returns text content from the argument file path. The file path can be absolute or relative to the FileManager's [RelativeDirectory](/flatredball/api/flatredball/io/filemanager/relativedirectory.md).

FromFileText can be used on all FlatRedBall platforms safely. Internally it uses TitleContainer if required for a particular platform.

### Example - Loading JSON Contents

The following code shows how to load a file called EnemyData.json.

```csharp
var jsonContents = FlatRedBall.IO.FileManager.FromFileText(
    "Content/GlobalContent/EnemyData.json");
```

This code assumes that the file EnemyData.json is located in the Content/GlobalContent folder, and that it is marked to copy if newer. The FlatRedBall Editor can manage this if you add the file to Global Content.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.flatredball.com/flatredball/api/flatredball/io/filemanager/fromfiletext.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
