fixed numerous bugs

This commit is contained in:
2026-01-23 16:38:53 +11:00
parent e75da2f297
commit 5bc61e30a6
10 changed files with 81 additions and 11 deletions

7
fileio/SUMMARY.md Normal file
View File

@@ -0,0 +1,7 @@
# fileio
Perform file system operations.
## Files
- [file_Read](docs/read.md)
- [file_Write](docs/write.md)

17
fileio/docs/read.md Normal file
View File

@@ -0,0 +1,17 @@
# file_Read
Open a file and return the contents in `r` mode.
## Arguments
- path (string): Path to the file you want to read
## Returns
- content (string): Contents of the file
## Raises
- `FileError`: Raised if the file doesn't exist or there was an error allocating memory for the file
## Example
```python
call !file_Read "my_file.txt" &contents
println $contents
```

17
fileio/docs/write.md Normal file
View File

@@ -0,0 +1,17 @@
# file_Write
Open a file and overwrite its contents with the provided string in `w` mode.
## Arguments
- path (string): Path to the file you want to write to
## Returns
- success (boolean): Whether writing to the file succeeded or not
## Raises
- `FileError`: Raised if the file doesn't exist
## Example
```python
call !file_Read "my_file.txt" &contents
println $contents
```

5
fileio/mineral.ini Normal file
View File

@@ -0,0 +1,5 @@
[package]
description=Provides file I/O support for Ground
version=1.2.0
[dependencies]