P
Pelle
Hello programmers,
I have a toolbox that's often working with a FILE * to access files
and the lot.
Recently, need has arisen to look at the filename of a file when I
only have a FILE *. I know I could be passing the filename from the
calling function, but since I don't know which entry to the toolbox I
took (e.g. toolbox-functions calling each other) it would be far
preferable
to query the filename of the file from the FILE * pointer that I
have.
Oh, and of course I'd need to find out if FILE * points to an actual
file or maybe something else.
Does anyone know how to do this?
Thanks in advance,
regards,
Pelle.
I have a toolbox that's often working with a FILE * to access files
and the lot.
Recently, need has arisen to look at the filename of a file when I
only have a FILE *. I know I could be passing the filename from the
calling function, but since I don't know which entry to the toolbox I
took (e.g. toolbox-functions calling each other) it would be far
preferable
to query the filename of the file from the FILE * pointer that I
have.
Oh, and of course I'd need to find out if FILE * points to an actual
file or maybe something else.
Does anyone know how to do this?
Thanks in advance,
regards,
Pelle.