pub async fn read_group_file<'a>(
virtual_file_system: &'a VirtualFileSystem<'a>,
buffer: &mut Vec<u8>,
file: &str,
) -> Result<Group>
Expand description
Reads and parses a group file from the filesystem.
This function is used internally to load group data from JSON files.
It reads the file contents into the provided buffer and deserializes
the JSON data into a Group_type
structure.
§Arguments
Virtual_file_system
- Reference to the virtual file systemBuffer
- Mutable buffer to use for reading file contentsFile
- Name of the group file to read
§Returns
Returns Ok(Group_type)
with the parsed group data,
or an appropriate error if reading or parsing fails.
§Errors
- Path construction failures
- File system errors (opening, reading)
- JSON parsing errors