for what do you need it? If you want a refnum out of a path you have to open the file. The "Get File Size" function is something like polymorphic and can both inputs (path and Refnum), so internal the "Get File Size" function also open your file.
I want to write some text to a file using write to text file. But I want to write text at its end (i.e., append at the end of the existing file). For that purpose I have used Set File Position which requires a refnum. To convert path to refnum I use Get File Size (about which I am not happy since I do not require file size). So I was wondering if an elegant solution existed.
You have to use Open File. The Write to Text File function will accept a path or a refnum. For a refnum it assumes the file has already been opened. If you wire a path then you can't use the Set File Position. That's how File I/O functions work.