Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PATH = internalDirectory + "/Settings";
- DIR* dir = opendir(PATH.data());
- if (!dir) { // Install
- if (errno == ENOENT) { /* Directory does not exist. */
- SFLOGI("Settings: Installing");
- // Create the dirs for first time - Installation
- createDirs(PATH, S_IRUSR | S_IWUSR);
- // Copy files from Assets to user memory
- copyFiles();
- }
- }
- DIR* dir2 = opendir(PATH.data());
- if (dir2 != NULL) { /* Directory exists. */
- SFLOGI("Settings: Loading...");
- struct dirent *ent;
- while ((ent = readdir(dir2)) != NULL) {
- //File file;
- //file.name = ent->d_name;
- //if (ent->d_type == DT_REG) {
- SFLOGI("name= %s", ent->d_name);
- //}
- }
- closedir(dir2);
- }
Add Comment
Please, Sign In to add comment