m2mb API docs  25.30.003
m2mb API sets documentation
m2mb_fs_stdio.h
Go to the documentation of this file.
1 /*===============================================================================================*/
2 /* >>> Copyright (C) Telit Communications S.p.A. Italy All Rights Reserved. <<< */
38 #ifndef M2M_M2MB_FS_STDIO_H
39 #define M2M_M2MB_FS_STDIO_H
40 
41 
42 /* Global declarations ==========================================================================*/
43 #ifndef NULL
44 #define NULL 0
45 #endif
46 
47 #ifndef M2M_M2MB_FS_POSIX_H
48 /* Files seek flags */
49 #define M2MB_SEEK_SET 0 /* Seek from beginning of file. */
50 #define M2MB_SEEK_CUR 1 /* Seek from current position. */
51 #define M2MB_SEEK_END 2 /* Seek from end of file. */
52 #endif /* M2M_M2MB_FS_POSIX_H */
53 
54 /* Global typedefs ==============================================================================*/
55 /* This struct must be used only as a pointer. The actual structure is opaque to users. */
56 typedef struct M2MB_FILE_TAG M2MB_FILE_T;
57 
58 /* Global functions =============================================================================*/
59 /*-----------------------------------------------------------------------------------------------*/
98 /*-----------------------------------------------------------------------------------------------*/
99 M2MB_FILE_T *m2mb_fs_fopen( const CHAR *path, const CHAR *mode );
100 
101 /*-----------------------------------------------------------------------------------------------*/
132 /*-----------------------------------------------------------------------------------------------*/
133 SIZE_T m2mb_fs_fread( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
134 
135 /*-----------------------------------------------------------------------------------------------*/
166 /*-----------------------------------------------------------------------------------------------*/
167 SIZE_T m2mb_fs_fwrite( void *ptr, SIZE_T size, SIZE_T nitems, M2MB_FILE_T *stream );
168 
169 /*-----------------------------------------------------------------------------------------------*/
193 /*-----------------------------------------------------------------------------------------------*/
194 INT32 m2mb_fs_fclose( M2MB_FILE_T *stream );
195 
196 /*-----------------------------------------------------------------------------------------------*/
227 /*-----------------------------------------------------------------------------------------------*/
228 INT32 m2mb_fs_fseek( M2MB_FILE_T *stream, INT32 offset, INT32 whence );
229 
230 /*-----------------------------------------------------------------------------------------------*/
253 /*-----------------------------------------------------------------------------------------------*/
254 INT32 m2mb_fs_ftell( M2MB_FILE_T *stream );
255 
256 /*-----------------------------------------------------------------------------------------------*/
279 /*-----------------------------------------------------------------------------------------------*/
280 INT32 m2mb_fs_fflush( M2MB_FILE_T *stream );
281 
282 /*-----------------------------------------------------------------------------------------------*/
305 /*-----------------------------------------------------------------------------------------------*/
306 INT32 m2mb_fs_fileno( M2MB_FILE_T *stream );
307 
308 /*-----------------------------------------------------------------------------------------------*/
332 /*-----------------------------------------------------------------------------------------------*/
333 INT32 m2mb_fs_fgetc( M2MB_FILE_T *stream );
334 
335 /*-----------------------------------------------------------------------------------------------*/
366 /*-----------------------------------------------------------------------------------------------*/
367 CHAR *m2mb_fs_fgets( CHAR *s, INT32 size, M2MB_FILE_T *stream );
368 
369 /*-----------------------------------------------------------------------------------------------*/
395 /*-----------------------------------------------------------------------------------------------*/
396 INT32 m2mb_fs_fputc( INT32 c, M2MB_FILE_T *stream );
397 
398 /*-----------------------------------------------------------------------------------------------*/
424 /*-----------------------------------------------------------------------------------------------*/
425 INT32 m2mb_fs_fputs( const CHAR *s, M2MB_FILE_T *stream );
426 
427 /*-----------------------------------------------------------------------------------------------*/
450 /*-----------------------------------------------------------------------------------------------*/
451 INT32 m2mb_fs_remove( const CHAR *path );
452 
453 /*-----------------------------------------------------------------------------------------------*/
479 /*-----------------------------------------------------------------------------------------------*/
480 INT32 m2mb_fs_rename( const CHAR *oldpath, const CHAR *newpath );
481 
482 
483 #endif /* M2M_M2MB_FS_STDIO_H */
484 
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.