WE310F5  39.00.000
m2mb_fs_stdio.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
23 #ifndef M2M_M2MB_FS_STDIO_H
24 #define M2M_M2MB_FS_STDIO_H
25 
35 /*-----------------------------------------------------------------------------------------------*/
36 
37 
42 /*-----------------------------------------------------------------------------------------------*/
43 
44 
45 /* Global declarations ==========================================================================*/
46 #ifndef NULL
47 #define NULL 0
48 #endif
49 
50 #ifndef M2M_M2MB_FS_POSIX_H
51 /* Files seek flags */
52 #define M2MB_SEEK_SET 0
53 #define M2MB_SEEK_CUR 1
54 #define M2MB_SEEK_END 2
55 #endif /* M2M_M2MB_FS_POSIX_H */
56 
57 /* Global typedefs ==============================================================================*/
58 /* This struct must be used only as a pointer. The actual structure is opaque to users. */
59 typedef struct M2MB_FILE_TAG M2MB_FILE_T;
60 
61 /* Global functions =============================================================================*/
62 /*-----------------------------------------------------------------------------------------------*/
111 /*-----------------------------------------------------------------------------------------------*/
112 M2MB_FILE_T *m2mb_fs_fopen( const CHAR *path, const CHAR *mode );
113 
114 /*-----------------------------------------------------------------------------------------------*/
167 /*-----------------------------------------------------------------------------------------------*/
168 SIZE_T m2mb_fs_fread( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
169 
170 /*-----------------------------------------------------------------------------------------------*/
240 /*-----------------------------------------------------------------------------------------------*/
241 SIZE_T m2mb_fs_fwrite( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
242 
243 /*-----------------------------------------------------------------------------------------------*/
291 /*-----------------------------------------------------------------------------------------------*/
292 INT32 m2mb_fs_fclose( M2MB_FILE_T *stream );
293 
294 /*-----------------------------------------------------------------------------------------------*/
341 /*-----------------------------------------------------------------------------------------------*/
342 INT32 m2mb_fs_fseek( M2MB_FILE_T *stream, INT32 offset, INT32 whence );
343 
344 /*-----------------------------------------------------------------------------------------------*/
383 /*-----------------------------------------------------------------------------------------------*/
384 INT32 m2mb_fs_ftell( M2MB_FILE_T *stream );
385 
386 /*-----------------------------------------------------------------------------------------------*/
423 /*-----------------------------------------------------------------------------------------------*/
424 INT32 m2mb_fs_fgetc( M2MB_FILE_T *stream );
425 
426 /*-----------------------------------------------------------------------------------------------*/
472 /*-----------------------------------------------------------------------------------------------*/
473 CHAR *m2mb_fs_fgets( CHAR *s, INT32 size, M2MB_FILE_T *stream );
474 
475 /*-----------------------------------------------------------------------------------------------*/
520 /*-----------------------------------------------------------------------------------------------*/
521 INT32 m2mb_fs_fputc( INT32 c, M2MB_FILE_T *stream );
522 
523 /*-----------------------------------------------------------------------------------------------*/
566 /*-----------------------------------------------------------------------------------------------*/
567 INT32 m2mb_fs_fputs( const CHAR *s, M2MB_FILE_T *stream );
568 
569 /*-----------------------------------------------------------------------------------------------*/
608 /*-----------------------------------------------------------------------------------------------*/
609 INT32 m2mb_fs_remove( const CHAR *path );
610 
611 /*-----------------------------------------------------------------------------------------------*/
648 /*-----------------------------------------------------------------------------------------------*/
649 INT32 m2mb_fs_rename( const CHAR *oldpath, const CHAR *newpath );
650 
654 /*-----------------------------------------------------------------------------------------------*/
655 
656 #endif /* M2M_M2MB_FS_STDIO_H */
657 
INT32 m2mb_fs_fseek(M2MB_FILE_T *stream, INT32 offset, INT32 whence)
Move file position indicator.
CHAR * m2mb_fs_fgets(CHAR *s, INT32 size, M2MB_FILE_T *stream)
Read line string from file as stream.
struct M2MB_FILE_TAG M2MB_FILE_T
Definition: m2mb_fs_stdio.h:59
INT32 m2mb_fs_fgetc(M2MB_FILE_T *stream)
Read char from file as stream.
SIZE_T m2mb_fs_fwrite(void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream)
Write file as stream.
INT32 m2mb_fs_fclose(M2MB_FILE_T *stream)
Close file as stream.
INT32 m2mb_fs_rename(const CHAR *oldpath, const CHAR *newpath)
Rename file or directory.
char CHAR
Definition: m2mb_types.h:76
INT32 m2mb_fs_remove(const CHAR *path)
Delete file.
INT32 m2mb_fs_fputc(INT32 c, M2MB_FILE_T *stream)
Write char to file as stream.
UINT32 SIZE_T
Definition: m2mb_types.h:105
INT32 m2mb_fs_ftell(M2MB_FILE_T *stream)
Get file position indicator.
INT32 m2mb_fs_fputs(const CHAR *s, M2MB_FILE_T *stream)
Write string to file as stream.
SIZE_T m2mb_fs_fread(void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream)
Read file as stream.
signed int INT32
Definition: m2mb_types.h:82
M2MB_FILE_T * m2mb_fs_fopen(const CHAR *path, const CHAR *mode)
Opens file as stream.