/*
 *	dir.h
 */

#define	IS_DIR(dp)	(dp->d_att & 0x10)

typedef struct direct {
    struct direct	*d_next;
    struct direct	*d_child;
    unsigned char	d_att;
    unsigned short int	d_time,d_date;
    unsigned long	d_size;
    char		d_name[1];
} DIRECT;

typedef struct {
    DIRECT	*dd_top;
    DIRECT	*dd_now;
} DIR;

DIR	*opendir(char *dir);
DIRECT	*readdir(DIR *dirp);
void	seekdir(DIR *dirp,int n);
void	closedir(DIR *dirp);
unsigned long	sizedir(char *dir);

int	chdrv(int no);
int	chdir(char *name);
int	getdrv(void);
int	getdir(char *name);
int	mkdir(char *name);
int	rmdir(char *name);
int	getattr(char *name);
int	disk_free(int drv, unsigned long *fr, unsigned long *ta);
int	drvsts(int drv);
int	isdir(char *name);
char	*joint_path(char *dir,char *file);
char	*file_serch(char *dir,char *file);
