Nintendo 3DS >> C/C++
File
參考資訊:
1. libctru doc
2. 3ds-examples
說明:
SDCard目錄位於:sdmc:/
main.c
#include <stdio.h> #include <string.h> #include <fcntl.h> #include <unistd.h> int main(void) { int fd = open("sdmc:/3ds/log.txt", O_RDWR | O_CREAT, 0666); if (fd > 0) { const char *p = "3ds file testing"; write(fd, p, strlen(p)); close(0); } return 0; }