1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
8 * $Id: dir.h 13741 2007-06-30 02:08:27Z jethead71 $
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 ****************************************************************************/
19 #ifndef _DIR_UNCACHED_H_
20 #define _DIR_UNCACHED_H_
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_uncached sim_dirent
35 #define DIR_UNCACHED SIM_DIR
36 #define opendir_uncached sim_opendir
37 #define readdir_uncached sim_readdir
38 #define closedir_uncached sim_closedir
39 #define mkdir_uncached sim_mkdir
40 #define rmdir_uncached sim_rmdir
43 #ifndef DIRENT_DEFINED
45 struct dirent_uncached
{
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
;
63 struct dirent_uncached theent
;
64 #ifdef HAVE_MULTIVOLUME
65 int volumecounter
; /* running counter for faked volume entries */
69 void *dir
; /* actually a DIR* dir */
75 char *get_volume_name(int volume
);
78 #ifndef DIRFUNCTIONS_DEFINED
80 extern DIR_UNCACHED
* opendir_uncached(const char* name
);
81 extern int closedir_uncached(DIR_UNCACHED
* dir
);
82 extern int mkdir_uncached(const char* name
);
83 extern int rmdir_uncached(const char* name
);
85 extern struct dirent_uncached
* readdir_uncached(DIR_UNCACHED
* dir
);
87 extern int release_dirs(int volume
);
89 #endif /* DIRFUNCTIONS_DEFINED */