bevy/crates/bevy_asset/src/io/file
François 49bc6cfd62
support file operations in single threaded context (#10312)
# Objective

- Fixes #10209 
- Assets should work in single threaded

## Solution

- In single threaded mode, don't use `async_fs` but fallback on
`std::fs` with a thin layer to mimic the async API
- file `file_asset.rs` is the async imps from `mod.rs`
- file `sync_file_asset.rs` is the same with `async_fs` APIs replaced by
`std::fs`
- which module is used depends on the `multi-threaded` feature

---------

Co-authored-by: Carter Anderson <mcanders1@gmail.com>
2023-11-03 23:00:34 +00:00
..
file_asset.rs support file operations in single threaded context (#10312) 2023-11-03 23:00:34 +00:00
file_watcher.rs Multiple Asset Sources (#9885) 2023-10-13 23:17:32 +00:00
mod.rs support file operations in single threaded context (#10312) 2023-11-03 23:00:34 +00:00
sync_file_asset.rs support file operations in single threaded context (#10312) 2023-11-03 23:00:34 +00:00