diff options
Diffstat (limited to 'firmware/include/dircache.h')
-rw-r--r-- | firmware/include/dircache.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/firmware/include/dircache.h b/firmware/include/dircache.h index b5b1b72c40..0950d0078b 100644 --- a/firmware/include/dircache.h +++ b/firmware/include/dircache.h | |||
@@ -76,11 +76,20 @@ struct dircache_entry { | |||
76 | char *d_name; | 76 | char *d_name; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | struct dirent_cached { | ||
80 | char *d_name; | ||
81 | int attribute; | ||
82 | long size; | ||
83 | long startcluster; | ||
84 | unsigned short wrtdate; /* Last write date */ | ||
85 | unsigned short wrttime; /* Last write time */ | ||
86 | }; | ||
87 | |||
79 | typedef struct { | 88 | typedef struct { |
80 | bool busy; | 89 | bool busy; |
81 | struct dircache_entry *entry; | 90 | struct dirent_cached theent; /* .attribute is set to -1 on init(opendir) */ |
82 | struct dircache_entry *internal_entry; | 91 | /* the two following field can't be used at the same time so have an union */ |
83 | struct dircache_entry secondary_entry; | 92 | struct dircache_entry *internal_entry; /* the current entry in the directory */ |
84 | DIR_UNCACHED *regulardir; | 93 | DIR_UNCACHED *regulardir; |
85 | } DIR_CACHED; | 94 | } DIR_CACHED; |
86 | 95 | ||
@@ -111,7 +120,7 @@ void dircache_rename(const char *oldpath, const char *newpath); | |||
111 | void dircache_add_file(const char *path, long startcluster); | 120 | void dircache_add_file(const char *path, long startcluster); |
112 | 121 | ||
113 | DIR_CACHED* opendir_cached(const char* name); | 122 | DIR_CACHED* opendir_cached(const char* name); |
114 | struct dircache_entry* readdir_cached(DIR_CACHED* dir); | 123 | struct dirent_cached* readdir_cached(DIR_CACHED* dir); |
115 | int closedir_cached(DIR_CACHED *dir); | 124 | int closedir_cached(DIR_CACHED *dir); |
116 | int mkdir_cached(const char *name); | 125 | int mkdir_cached(const char *name); |
117 | int rmdir_cached(const char* name); | 126 | int rmdir_cached(const char* name); |