-
-
Notifications
You must be signed in to change notification settings - Fork 41
Stream Files (API)
Ali Hussain edited this page Sep 28, 2023
·
1 revision
Unlike non-stream files the maximum size doesn't need to be known on boot - for stream files, there are no size limitations, and the size doesn't need to be known until it is loaded!
Here's is what a stream callback looks like:
use arcropolis_api::stream_callback;
#[stream_callback]
fn my_callback(hash: u64) -> T {
// ...
}
It takes a hash of the full path and returns any of the following:
-
PathBuf
- A path to a file on the sd card to load -
String
- A path to a file on the sd card to load -
Vec<u8>
- the contents of the file (note: if the file is on SD, this will be less efficient) -
Option<T>
whereT
is any of the types in this list* -
Result<T, E>
whereT
is any of the types in this list*
* When None
/Err
is returned, Arcropolis will load the file from the SD card (if available) or from the vanilla data.arc
- Home
- Getting started
- Features
- Troubleshooting
- Introduction to code modding (Coming soon, maybe, someday, eventually)
- Rust for Smash modding
- Introduction
- Beginner
- Intermediate
- Advanced
- Cheat sheet
- Rust for Smash modding
- Guides
- Overview
- ARCropolis API
- Miscellaneous