Hi,
I had just a look at the stdio.h where I could find the FILE structure definition:
typedef struct {
int level; /* fill/empty level of buffer */
unsigned flags; /* File status flags */
char fd; /* File descriptor */
unsigned char hold; /* Ungetc char if no buffer */
int bsize; /* Buffer size */
unsigned char *buffer; /* Data transfer buffer */
unsigned char *curp; /* Current active pointer */
unsigned istemp; /* Temporary file indicator */
short token; /* Used for validity checking */
} FILE;
Now, I am wondering if I could create myself (not using fopen) a valid FILE pointer to a stream which I could use then in subsequent calls for fread or fwrite? It is more a theoretical question so please do not wonder why I wanna know that ;)
Moreover, is it correct that stdio does not provide a routine to delete a file? In this case I need OS calls, don't I?
Thanks