h6. [[OS SWI Calls]] h6(. » [[OS_File]] h6((. » OS_File 20 h2. OS_ File 20 h5. (SWI &08) |_<^{width:3em}. Entry | | |<^. R0 |<^. 20 (reason code) | |<^. R1 |<^. Pointer to filename | |_<^{width:3em}. Exit | | |<^. R0 |<^. [[File Object Types|Object type]] | |<^. R1 |<^. Preserved | |<^. R2 |<^. "Load address":linkload (without top three bytes if file is typed) | |<^. R3 |<^. "Execution address":linkexecution | |<^. R4 |<^. Object length | |<^. R5 |<^. "Object attributes":linkattributes | |<^. R6 |<^. Object filetype | h4. Use The purpose of this call is to read catalogue information for a named file, using <code>File$Path</code>. h4. Notes R2 to R6 may be corrupted if the object is not found. The value returned in R6 is 4096 (&1000) for images and directories, and 8192 (&2000) for applications. A value of -1 returned in R6 can also mean: * An untyped file, when R2 and R3 contain addresses * No file found, when R0 = 0 h4. See also * "Execution address":linkexecution * "Load address":linkload * "Object attributes":linkattributes * [[File Object Types|Object type]] * [[OS_File]] * [[OS_File 21]] (using a path string) * [[OS_File 22]] (using a path variable) * [[OS_File 23]] (using no path) [linkload]FileSwitch%20Key%20Features#load_execution [linkexecution]FileSwitch%20Key%20Features#load_execution [linkattributes]FileSwitch%20Key%20Features#file_attributes