📄 mt_ffs.h
字号:
/*****************************************************************************
** File Name: *
** Author: *
** Date: 2007/05/02 *
** Copyright: 2007 MTONE, Inc. All Rights Reserved. *
** Description: *
******************************************************************************
** Important Edit History *
** --------------------------------------------------------------------------*
** DATE NAME DESCRIPTION *
** 2007/05/02 Create *
*****************************************************************************/
#ifndef _MT_FFS_H_
#define _MT_FFS_H_
#ifdef __cplusplus
extern "C"
{
#endif
// #define MTFFS_TOPWISE_FRW
#define MTFFS_TOPWISE_ISO
////////////////////////////////////////////////////////////////
#if defined( _WIN32 ) && !defined( MTFFS_TOPWISE_ISO )
#include <direct.h>
#include <fcntl.h>
#include <io.h>
#include <stdio.h>
#else
#ifdef _WIN32
#include "WINDOWS_sci_os.h"
#endif
#include "ffs.h"
#endif
#if defined( _WIN32 ) && !defined( MTFFS_TOPWISE_ISO )
#define SIZE_T size_t
#else
// #define SIZE_T unsigned int
#endif
#define FFS_MAX_PATH 256
typedef enum
{
MTFS_HS,
MTFS_UDISK,
MTFS_MMC,
MTFS_MMC2,
MTFS_INVALID
} MT_FILE_DEV_E_T;
typedef struct
{
#if defined( _WIN32 ) && !defined( MTFFS_TOPWISE_ISO )
FILE *m_stream;
#else
SCI_FILE *m_stream;
#endif
MT_FILE_DEV_E_T m_filedev;
} MTFFS_FILE;
#define MT_SEEK_SET 0 // beginning of file
#define MT_SEEK_CUR 1 // current position of file pointer
#define MT_SEEK_END 2 // end of file
MTFFS_FILE *MTFFS_fopen( MT_FILE_DEV_E_T filedev, const char *filename, const char *mode );
int MTFFS_fclose( MTFFS_FILE *stream );
SIZE_T MTFFS_fread( void *buffer, SIZE_T size, SIZE_T count, MTFFS_FILE *stream );
SIZE_T MTFFS_fwrite( const void *buffer, SIZE_T size, SIZE_T count, MTFFS_FILE *stream );
int MTFFS_fseek( MTFFS_FILE *stream, long offset, int origin );
unsigned long MTFFS_ftell( MTFFS_FILE *stream );
int MTFFS_feof( MTFFS_FILE *stream );
char *MTFFS_fgets( char *string, int n, MTFFS_FILE *stream );
int MTFFS_fputs( const char *string, MTFFS_FILE *stream );
int MTFFS_mkdir( MT_FILE_DEV_E_T filedev, const char *dirname );
int MTFFS_chdir( MT_FILE_DEV_E_T filedev, const char *dirname );
int MTFFS_remove( MT_FILE_DEV_E_T filedev, const char *filename );
int MTFFS_rename( MT_FILE_DEV_E_T filedev, const char *oldname, const char *newname );
int MTFFS_length( MT_FILE_DEV_E_T filedev, const char *filename );
#ifdef __cplusplus
}
#endif
#endif // _MT_FFS_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -