Comments (4)
Wrote a little test program and it works fine. I can see the contents of the /filesystem folder of my Everdrive on my N64.
#include "libdragon.h"
// Read the contents of the SD card on an Everdrive 64
// Tested on an Everdrive 64 X7
// This code will list all files and directories in the /filesystem folder of the SD card
// Create a folder named "filesystem" on the root of the SD card and put some files in it.
int main() {
debug_init(DEBUG_FEATURE_LOG_ISVIEWER);
console_init();
/* This will initialize the SD filesystem using 'sd:/' to identify it */
if (!debug_init_sdfs("sd:/", -1)) {
debugf("Error opening SD\n");
printf("Error opening SD\n");
exit(1);
}
dir_t dir;
int err = dir_findfirst("sd:/",&dir);
int count = 0;
while( err == 0 ) {
if (dir.d_type == DT_DIR) {
printf("[%s]\n", dir.d_name);
} else {
printf("%s\n", dir.d_name);
}
err = dir_findnext("sd:/", &dir);
count++;
}
if (count == 0) {
printf("No files in this dir...\n");
}
}
Thanks again!
from libdragon.
It is indeed possible using dir_findfirst
/ dir_findnext
, but I think it's currently buggy on trunk. It should be fixed in the preview branch. I'm merging lots of changes from preview to trunk in these days, I'll touch this issue once it's fixed.
from libdragon.
Hopefully the fix was merged in the latest merge train.
from libdragon.
Thanks again!
from libdragon.
Related Issues (20)
- Hello world HOT 1
- Can't draw sprite with rdp unless drawing in software first HOT 2
- ARM platforms not supported in the Dockerfiles on GHCR HOT 3
- [preview] RSP crash (?) with an extremely simple rom using rdpq
- [preview] rdpq validator validates tile for tex0 even if the combiner does not use it HOT 1
- [preview] new joypad library does not work on iQue HOT 1
- [preview] emit an assert when using Opus on a mixer channel not ready for 48 Khz HOT 1
- Add an assertion when using old-school sprite loading with compressed sprites HOT 1
- [preview] regression in mixer causes audio playback issues with XM64 HOT 1
- stat() doesn't work on directories HOT 1
- argument 1 value ‘18446744073709551611’ exceeds maximum object size 9223372036854775807 HOT 1
- identify_accessory() identifies controller pak as rumble pak HOT 6
- Random Crashes / corruptions when using simple ucode
- Backtrace broken in case exception is triggered in tail call
- Missing examples (good first issue!) HOT 2
- rdpq_sprite_blit crop doesn't work with flipping
- PAL50 resolutions are letterboxed
- Improve FatFs speed by merging wf-fatfs changes
- Disable rumble pak on reset/crash HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libdragon.