Help please - File open/closed status

I am assigning a file variable:

{declaration}
myFile : File;

AssignFile(myFile, myFileName);

At present I use a flag to indicate whether or not "myFile" is
currently pointing to a file which should be closed before I
assign a new one.  Is there a better way that I can do this?
e.g. querying the file variable in some way

When looking at the file variable at run-time, it has the
following contents:
Initially        : (closed)
After assignfile : (closed, 'c:\path\filename.ext')
After reset      : (open, 'c:\path\filename.ext')

Is there a way of getting at the closed/open above?

Many thanks for any help/advice,
   Paul