h6. [[OS SWI Calls]] h6(. » OS_FSControl h2. OS_FSControl h5. (SWI &29) |_<^{width:3em}. Entry | | |<^. R0 |<^. "Reason code":#reason | |\2<^. Other registers dependent on reason code| |_<^{width:3em}. Exit | | |<^. R0 |<^. Preserved | |\2<^. Other registers dependent on reason code| h4. Use The purpose of this call is control the filing system manager and the filing system themselves. h4. Notes The action performed depends on the reason code value in R0. h4(#reason). Reason Codes |_<^{width:3em}. #|_<^{width:4em}. Hex #|_<^. Action| |<^. 0|<^. &00|<^. [[OS_FSControl 0|Set current dir]]| |<^. 1|<^. &01|<^. [[OS_FSControl 1|Set library dir]]| |<^. 2|<^. &02|<^. [[OS_FSControl 2|Inform of start of new app]]| |<^. 3|<^. &03|<^. Run Type (Internal use only)| |<^. 4|<^. &04|<^. [[OS_FSControl 4|Run a file]]| |<^. 5|<^. &05|<^. [[OS_FSControl 5|Catalogue a dir]]| |<^. 6|<^. &06|<^. [[OS_FSControl 6|Examine current dir]]| |<^. 7|<^. &07|<^. [[OS_FSControl 7|Catalogue library]]| |<^. 8|<^. &08|<^. [[OS_FSControl 8|Examine library]]| |<^. 9|<^. &09|<^. [[OS_FSControl 9|Examine objects]]| |<^. 10|<^. &0A|<^. [[OS_FSControl 10|Set FS options]]| |<^. 11|<^. &0B|<^. [[OS_FSControl 11|Set temporary FS]]| |<^. 12|<^. &0C|<^. [[OS_FSControl 12|Add a FS]]| |<^. 13|<^. &0D|<^. [[OS_FSControl 13|Check for FS]]| |<^. 14|<^. &0E|<^. [[OS_FSControl 14|Select FS]]| |<^. 15|<^. &0F|<^. [[OS_FSControl 15|Boot from FS]]| |<^. 16|<^. &10|<^. [[OS_FSControl 16|Remove FS]]| |<^. 17|<^. &11|<^. [[OS_FSControl 17|Add secondary module]]| |<^. 18|<^. &12|<^. [[OS_FSControl 18|Convert filetype number to name]]| |<^. 19|<^. &13|<^. [[OS_FSControl 19|Restore current FS]]| |<^. 20|<^. &14|<^. [[OS_FSControl 20|Read location of temp FS]]| |<^. 21|<^. &15|<^. [[OS_FSControl 21|Return a file handle]]| |<^. 22|<^. &16|<^. [[OS_FSControl 22|Close all open files]]| |<^. 23|<^. &17|<^. [[OS_FSControl 23|Shutdown FS]]| |<^. 24|<^. &18|<^. [[OS_FSControl 24|Set attributes of objects]]| |<^. 25|<^. &19|<^. [[OS_FSControl 25|Rename object]]| |<^. 26|<^. &1A|<^. [[OS_FSControl 26|Copy objects]]| |<^. 27|<^. &1B|<^. [[OS_FSControl 27|Wipe objects]]| |<^. 28|<^. &1C|<^. [[OS_FSControl 28|Count objects]]| |<^. 29|<^. &1D|<^. Create Handle (Internal use only)| |<^. 30|<^. &1E|<^. [[OS_FSControl 30|Read location of temporary FS secondary module]]| |<^. 31|<^. &1F|<^. [[OS_FSControl 31|Convert filetype name to number]]| |<^. 32|<^. &20|<^. [[OS_FSControl 32|Output list of object names & info]]| |<^. 33|<^. &21|<^. [[OS_FSControl 33|Convert a filing system number to a name]]| |<^. 34|<^. &22|<^. Set Contexts (Reserved)| |<^. 35|<^. &23|<^. [[OS_FSControl 35|Add an image FS]]| |<^. 36|<^. &24|<^. [[OS_FSControl 36|Remove an image FS]]| |<^. 37|<^. &25|<^. [[OS_FSControl 37|Canonicalise path]]| |<^. 38|<^. &26|<^. [[OS_FSControl 38|Extract filetype from file information]]| |<^. 39|<^. &27|<^. [[OS_FSControl 39|Set User Root Directory]]| |<^. 40|<^. &28|<^. [[OS_FSControl 40|Swap current and previous directories]]| |<^. 41|<^. &29|<^. [[OS_FSControl 41|Return defect list for an image file]]| |<^. 42|<^. &2A|<^. [[OS_FSControl 42|Map out defect from an image file]]| |<^. 43|<^. &2B|<^. [[OS_FSControl 43|Unset the Current Directory]]| |<^. 44|<^. &2C|<^. [[OS_FSControl 44|Unset the User Root Directory]]| |<^. 45|<^. &2D|<^. [[OS_FSControl 45|Unset the Library Directory]]| |<^. 46|<^. &2E|<^. [[OS_FSControl 46|Return used space map of image file]]| |<^. 47|<^. &2F|<^. [[OS_FSControl 47|Read boot option for disc or image file]]| |<^. 48|<^. &30|<^. [[OS_FSControl 48|Write boot option for disc or image file]]| |<^. 49|<^. &31|<^. [[OS_FSControl 49|Read free space for disc or image file]]| |<^. 50|<^. &32|<^. [[OS_FSControl 50|Rename disc or image file]]| |<^. 51|<^. &33|<^. [[OS_FSControl 51|Request update of image stamp]]| |<^. 52|<^. &34|<^. [[OS_FSControl 52|Find object at offset within image file]]| |<^. 53|<^. &35|<^. [[OS_FSControl 53|Set given directory to path unchecked]]| |<^. 54|<^. &36|<^. [[OS_FSControl 54|Read path of given directory]]| |<^. 55|<^. &37|<^. [[OS_FSControl 55|Read free space for a large disc or image file]]| |<^. 56|<^. &38|<^. [[OS_FSControl 56|Read defect list for a large disc or image file]]| |<^. 57|<^. &39|<^. [[OS_FSControl 57|Map out defect from large disc or image]]| |<^. 58|<^. &3A|<^. [[OS_FSControl 58|Enumerate file handles]]| h4. See also * [[File Descriptor Blocks]] * [[Flags For File Operations]] [linkcode3]OS_FSControl%203 [linkcode29]OS_FSControl%2029 [linkcode34]OS_FSControl%2034