m2mb API docs  25.30.004.0
m2mb API sets documentation
m2mb_fs_stdio.h
Go to the documentation of this file.
1 /* $version: 252203 */
2 /*===============================================================================================*/
3 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
39 #ifndef M2M_M2MB_FS_STDIO_H
40 #define M2M_M2MB_FS_STDIO_H
41 
42 
43 /* Global declarations ==========================================================================*/
44 #ifndef NULL
45 #define NULL 0
46 #endif
47 
48 #ifndef M2M_M2MB_FS_POSIX_H
49 /* Files seek flags */
50 #define M2MB_SEEK_SET 0 /* Seek from beginning of file. */
51 #define M2MB_SEEK_CUR 1 /* Seek from current position. */
52 #define M2MB_SEEK_END 2 /* Seek from end of file. */
53 #endif /* M2M_M2MB_FS_POSIX_H */
54 
55 /* Global typedefs ==============================================================================*/
56 /* This struct must be used only as a pointer. The actual structure is opaque to users. */
57 typedef struct M2MB_FILE_TAG M2MB_FILE_T;
58 
59 /* Global functions =============================================================================*/
60 /*-----------------------------------------------------------------------------------------------*/
99 /*-----------------------------------------------------------------------------------------------*/
100 M2MB_FILE_T *m2mb_fs_fopen( const CHAR *path, const CHAR *mode );
101 
102 /*-----------------------------------------------------------------------------------------------*/
133 /*-----------------------------------------------------------------------------------------------*/
134 SIZE_T m2mb_fs_fread( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
135 
136 /*-----------------------------------------------------------------------------------------------*/
167 /*-----------------------------------------------------------------------------------------------*/
168 SIZE_T m2mb_fs_fwrite( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
169 
170 /*-----------------------------------------------------------------------------------------------*/
194 /*-----------------------------------------------------------------------------------------------*/
195 INT32 m2mb_fs_fclose( M2MB_FILE_T *stream );
196 
197 /*-----------------------------------------------------------------------------------------------*/
228 /*-----------------------------------------------------------------------------------------------*/
229 INT32 m2mb_fs_fseek( M2MB_FILE_T *stream, INT32 offset, INT32 whence );
230 
231 /*-----------------------------------------------------------------------------------------------*/
254 /*-----------------------------------------------------------------------------------------------*/
255 INT32 m2mb_fs_ftell( M2MB_FILE_T *stream );
256 
257 /*-----------------------------------------------------------------------------------------------*/
280 /*-----------------------------------------------------------------------------------------------*/
281 INT32 m2mb_fs_fflush( M2MB_FILE_T *stream );
282 
283 /*-----------------------------------------------------------------------------------------------*/
306 /*-----------------------------------------------------------------------------------------------*/
307 INT32 m2mb_fs_fileno( M2MB_FILE_T *stream );
308 
309 /*-----------------------------------------------------------------------------------------------*/
333 /*-----------------------------------------------------------------------------------------------*/
334 INT32 m2mb_fs_fgetc( M2MB_FILE_T *stream );
335 
336 /*-----------------------------------------------------------------------------------------------*/
367 /*-----------------------------------------------------------------------------------------------*/
368 CHAR *m2mb_fs_fgets( CHAR *s, INT32 size, M2MB_FILE_T *stream );
369 
370 /*-----------------------------------------------------------------------------------------------*/
396 /*-----------------------------------------------------------------------------------------------*/
397 INT32 m2mb_fs_fputc( INT32 c, M2MB_FILE_T *stream );
398 
399 /*-----------------------------------------------------------------------------------------------*/
425 /*-----------------------------------------------------------------------------------------------*/
426 INT32 m2mb_fs_fputs( const CHAR *s, M2MB_FILE_T *stream );
427 
428 /*-----------------------------------------------------------------------------------------------*/
451 /*-----------------------------------------------------------------------------------------------*/
452 INT32 m2mb_fs_remove( const CHAR *path );
453 
454 /*-----------------------------------------------------------------------------------------------*/
480 /*-----------------------------------------------------------------------------------------------*/
481 INT32 m2mb_fs_rename( const CHAR *oldpath, const CHAR *newpath );
482 
483 
484 #endif /* M2M_M2MB_FS_STDIO_H */
485 
m2mb_fs_ftell
INT32 m2mb_fs_ftell(M2MB_FILE_T *stream)
Get file position indicator.
m2mb_fs_fread
SIZE_T m2mb_fs_fread(void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream)
Read file as stream.
m2mb_fs_fflush
INT32 m2mb_fs_fflush(M2MB_FILE_T *stream)
Flush file as stream.
m2mb_fs_remove
INT32 m2mb_fs_remove(const CHAR *path)
Delete file.
m2mb_fs_rename
INT32 m2mb_fs_rename(const CHAR *oldpath, const CHAR *newpath)
Rename file or directory.
m2mb_fs_fgetc
INT32 m2mb_fs_fgetc(M2MB_FILE_T *stream)
Read char from file as stream.
m2mb_fs_fputc
INT32 m2mb_fs_fputc(INT32 c, M2MB_FILE_T *stream)
Write char to file as stream.
m2mb_fs_fseek
INT32 m2mb_fs_fseek(M2MB_FILE_T *stream, INT32 offset, INT32 whence)
Move file position indicator.
m2mb_fs_fopen
M2MB_FILE_T * m2mb_fs_fopen(const CHAR *path, const CHAR *mode)
Open file as stream.
m2mb_fs_fputs
INT32 m2mb_fs_fputs(const CHAR *s, M2MB_FILE_T *stream)
Write string to file as stream.
m2mb_fs_fgets
CHAR * m2mb_fs_fgets(CHAR *s, INT32 size, M2MB_FILE_T *stream)
Read line string from file as stream.
m2mb_fs_fwrite
SIZE_T m2mb_fs_fwrite(void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream)
Write file as stream.
m2mb_fs_fileno
INT32 m2mb_fs_fileno(M2MB_FILE_T *stream)
Get file integer descriptor.
m2mb_fs_fclose
INT32 m2mb_fs_fclose(M2MB_FILE_T *stream)
Close file as stream.