⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fileext.h

📁 JFFS的源代码
💻 H
字号:
/*------------------------------------------------------------------------
 Module:        fileext.h
 Author:        livefall@163.com
 Project:       
 State:         
 Creation Date: 2005-01-09
 Description:   文件扩展定义
------------------------------------------------------------------------*/

#ifndef _FILEEXT_H
#define _FILEEXT_H

#include <mytypes.h>

typedef int STATUS;

struct	stat
{
    DWORD	st_mode;	/* file mode (see below) */
    DWORD	st_size;	/* size of file, in bytes */
    DWORD	st_mtime;	/* time of last modification */
};

#define NAME_MAX		99
/* Directory entry */

struct dirent		/* dirent */
    {
    char	d_name [NAME_MAX + 1];	/* file name, null-terminated */
    };


/* HIDDEN */
/* Directory descriptor */

typedef struct		/* DIR */
    {
    int		  dd_fd;		/* file descriptor for open directory */
    int		  dd_cookie;		/* filesys-specific marker within dir */
    struct dirent dd_dirent;		/* obtained directory entry */
    } DIR;


#ifndef SEEK_SET
#define	SEEK_SET	0	/* set file offset to offset */
#endif

#ifndef SEEK_CUR
#define	SEEK_CUR	1	/* set file offset to current plus offset */
#endif

#ifndef SEEK_END
#define	SEEK_END	2	/* set file offset to EOF plus offset */
#endif


extern int errno;   /*????????????????*/

FILE *	fopen (const char *, const char *);  
int	fclose (FILE *);
int	feof (FILE *);
int	fread (void *, size_t, size_t, FILE *);
#if 0/*livefall@163.com 2005.01.10 */
STATUS stat
#endif
STATUS stat
    (
    char *        name, /* name of file to check */
    struct stat * pStat /* pointer to stat structure */
    );

int	fseek (FILE *, long, int);
int	fwrite (const void *, size_t, size_t, FILE *);
int	remove (const char *);
int	rename  (const char *, const char *);
int	cp  (const char *, const char *);
DIR *makedir(char *dirName);
DIR *opendir
    (
    char * dirName /* name of directory to open */
    );
struct dirent *readdir
    (
    DIR * pDir /* pointer to directory descriptor */
    );
#if 0/*livefall@163.com 2005.01.10*/
STATUS closedir
#endif
STATUS closedir
    (
    DIR * pDir /* pointer to directory descriptor */
    );


#endif /*_FILEEXT_H*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -