Skip to content

Commit

Permalink
Clarify format for files stored in subdirectories
Browse files Browse the repository at this point in the history
  • Loading branch information
quajak authored Sep 9, 2021
1 parent b40e781 commit 78a0f54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Docs/articles/Kernel/ManifestResouceStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Due to short comings in NASM there is a maximum size to any individual file whic
![image](https://user-images.githubusercontent.com/8559822/132468001-256b92d1-0b29-4db3-9ef5-3383bfdef023.png)
2. In the code reference the file using the following format (a static byte array with the attribute):
```
[ManifestResourceStream(ResourceName = “{project_name}.{filename_with_extension}”)]
[ManifestResourceStream(ResourceName = “{project_name}.{path}.{to}.{filename_with_extension}”)]
static byte[] file;
```
The field _must_ be static but the name can be changed. You will also need to add `using IL2CPU.API.Attribs;` to the code.
The field _must_ be static but the name of the field can be changed. You will also need to add `using IL2CPU.API.Attribs;` to the code.
For example, if the project is called Kernel and the file is `Data\Text.txt`, then `ResourceName = "Kernel.Data.Text.txt"`.

3. To access the data simply read from the byte array defined.

0 comments on commit 78a0f54

Please sign in to comment.