MicrOS
FILE Struct Reference

Object containing information to control a stream. More...

#include <stdio.h>

Public Attributes

char filename [FILENAME_MAX]
 Full path of the file (can be empty if stream is assigned to some hardware device). More...
 
file_mode mode
 
char * buffer
 Stream buffer. More...
 
uint32_t base
 Position of the buffer start in the stream. More...
 
uint32_t pos
 Current position in the stream. More...
 
uint32_t size
 Position of the buffer end in the stream. More...
 
uint32_t limit
 Total size of the stream (can be 0 if it's undefined like console or keyboard). More...
 
uint32_t error
 Error code. More...
 
file_buffering_mode buffering_mode
 Buffering mode of the stream. More...
 
int(* fetch )(struct file *file)
 Function which loads chunk of the data from stream and stores it to the buffer. More...
 
void(* flush )(struct file *file)
 Function which gets data from the buffer and sends it to the output (and removes it from the buffer). More...
 

Detailed Description

Object containing information to control a stream.

Object type that identifies a stream and contains the information needed to control it, including a pointer to its buffer, its position indicator and all its state indicators. !

Member Data Documentation

◆ base

uint32_t FILE::base

Position of the buffer start in the stream.

◆ buffer

char* FILE::buffer

Stream buffer.

◆ buffering_mode

file_buffering_mode FILE::buffering_mode

Buffering mode of the stream.

◆ error

uint32_t FILE::error

Error code.

◆ fetch

int(* FILE::fetch) (struct file *file)

Function which loads chunk of the data from stream and stores it to the buffer.

◆ filename

char FILE::filename[FILENAME_MAX]

Full path of the file (can be empty if stream is assigned to some hardware device).

◆ flush

void(* FILE::flush) (struct file *file)

Function which gets data from the buffer and sends it to the output (and removes it from the buffer).

◆ limit

uint32_t FILE::limit

Total size of the stream (can be 0 if it's undefined like console or keyboard).

◆ mode

file_mode FILE::mode

◆ pos

uint32_t FILE::pos

Current position in the stream.

◆ size

uint32_t FILE::size

Position of the buffer end in the stream.


The documentation for this struct was generated from the following file: