When you open or create a file, you can specify a path for that file programmatically or through a file dialog box. After the file opens, a refnum represents the file.
You also can select a file to open for reading and writing.