https://github.com/matchachoco010/ggez_zip_read_dir_test
test of ggez's read_dir methods
https://github.com/matchachoco010/ggez_zip_read_dir_test
Last synced: 6 days ago
JSON representation
test of ggez's read_dir methods
- Host: GitHub
- URL: https://github.com/matchachoco010/ggez_zip_read_dir_test
- Owner: MatchaChoco010
- Created: 2021-12-25T04:39:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-25T04:45:31.000Z (over 4 years ago)
- Last Synced: 2025-11-09T23:02:58.032Z (8 months ago)
- Language: Rust
- Size: 4.61 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ggez zip `read_dir()` test
My environments:
- Windows 11 Pro
- stable-x86_64-pc-windows-msvc (default) rustc 1.57.0 (f1edd0429 2021-11-29)
- ggez v0.7.0 (https://github.com/ggez/ggez?branch=devel#56fc4ac3)
---
The source code that uses the filesystem is as follows:
```rust
impl MyGame {
pub fn new(ctx: &mut Context) -> MyGame {
let mut images = vec![];
let exist_img = filesystem::exists(ctx, "/images/baboon.png");
println!("Is exists /images/baboon.png : {}", exist_img);
for p in filesystem::read_dir(ctx, "/images/").unwrap() {
println!("{:?}", p);
let image = Image::new(ctx, p).unwrap();
images.push(image);
}
MyGame { _images: images }
}
}
```
And the hierarchy of the resources directory is as follows:
```
/resources/
└─ images/
└─ baboon.png
```
This executable should be outputs like this:
```
Is exists /images/baboon.png : true
"/images/baboon.png"
```
If you run `test_no_zip/ggez_zip_read_dir_test.exe`, you get outputs like this correctly:

But, if you run `test_zip/ggez_zip_read_dir_test.exe`, you get outputs like this incorrectly:

This is due to the fact that `read_dir()` for zip files is not working properly on Windows 11.