1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 by Björn Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
25 #define ATTR_READ_ONLY 0x01
26 #define ATTR_HIDDEN 0x02
27 #define ATTR_SYSTEM 0x04
28 #define ATTR_VOLUME_ID 0x08
29 #define ATTR_DIRECTORY 0x10
30 #define ATTR_ARCHIVE 0x20
31 #define ATTR_VOLUME 0x40 /* this is a volume, not a real directory */
34 #define dirent sim_dirent
36 #define opendir(x) sim_opendir(x)
37 #define readdir(x) sim_readdir(x)
38 #define closedir(x) sim_closedir(x)
39 #define mkdir(x) sim_mkdir(x)
40 #define rmdir(x) sim_rmdir(x)
43 #ifndef DIRENT_DEFINED
46 unsigned char d_name
[MAX_PATH
];
50 unsigned short wrtdate
; /* Last write date */
51 unsigned short wrttime
; /* Last write time */
61 struct fat_dir fatdir
;
62 struct fat_dir parent_dir
;
64 #ifdef HAVE_MULTIVOLUME
65 int volumecounter
; /* running counter for faked volume entries */
69 void *dir
; /* actually a DIR* dir */
74 #ifndef DIRFUNCTIONS_DEFINED
76 extern DIR* opendir(const char* name
);
77 extern int closedir(DIR* dir
);
78 extern int mkdir(const char* name
);
79 extern int rmdir(const char* name
);
81 extern struct dirent
* readdir(DIR* dir
);
83 extern int release_dirs(int volume
);
85 #endif /* DIRFUNCTIONS_DEFINED */