h6. [[FileCore]] h6(. » [[FileCore Technical Details|Technical Details]] h6((. » Data Format and Disc Identifiers h2(#start). How Data is Stored h3(#dataformat). Data Format FileCore stores data as sequences of bytes that always begin at the start of a sector, and extend for the number of sectors necessary to accommodate the data contained in the file. As a result of this, the last sector used to accommodate the file may have a number of unused bytes at the end of it. The last actual data byte in the file is derived either from: * from the file length stored in the catalogue entry for the file * the extent of the file, if already open on the system <br /> h2(#discident). How to Specify a Disc There are two different ways in which to specify a disc: * Drive Number * Disc Name h3(#discnumber). Drive Number FileCore supports upto 8 drives, and has a limit of no more than four of the same physical type. table(bordered). |_<^{width:12em}. Number |_<^. Type of Drive | |<^. 0 - 3 |<^. Floppy disc drives | |<^. 4 - 7 |<^. HDD/SDD disc drives | <br /> h3(#discname). Disc Name When you refer to a disc by name, [[FileCore]] assumes that the disc is present and available. A disc name is set using [[*NameDisc]] command. You are *very strongly* recommended to use disc names rather than drive numbers when you develop programs and applications. Disc names may be used in any pathname given to the system. When used in a pathname, the disc name (or number) must be prefixed by a colon character. For Example: <code>*Cat :AlanDisc.Downloads</code> <code>*Info :4.!Boot*.*</code> Note that <code>:drive</code> really means <code>:drive.$</code>. Disc names can also have wildcards in them, so long as the name only matches one of the discs that FileCore knows about for the filing system. If more than one name matches FileCore will return an ‘Ambiguous disc name’ error. <br /> h3(#errors). Error Messages The following table details common error messages if the specified disc cannot be found: table(bordered). |_<^{width:24em}. Error Message |_<^. Reason | |<^. 'Disc not present' |<^. Disc *has* been previously seen by FileCore, but cannot be found. e.g. disc has been ejected from drive | |<^. 'Disc not known' |<^. Disc *has not* been seen | |<^. 'Ambiguous disc name' |<^. Wildcard disc name returns more than one known disc | It is possible to trap these errors before they are issued, which allows the user to be prompted to insert the disc into the drive. See [[OS_UpCall 1]] and [[OS_UpCall 2]] for more details. <br /> h3(#change). Changing Discs There is currently a limit of eight disc names __per filing system__ that FileCore can remember. This is done on a FIFO(First In, First Out) basis. When a disc is ejected from a drive, FileCore still ‘knows’ about it. This means that if there are any directories set on that disc (the current directory, user root directory, or library), they will still be associated with it. Thus any attempt to load or run a file will result in a 'Disc not present' or 'Disc not known' error. However, this means that you can replace the disc and still use it, as if it had never been ejected. The same applies to open files on the disc; they remain open and associated with that disc until they are closed. You can cause the old directories to be overridden by [[*Mount]]ing a new disc once it has been inserted. This resets the CSD and so on. Alternatively, if you unset the directories (using [[*NoDir]], [[*NoLib]] and [[*NoURD]]), then FileCore will use certain defaults when operations on these are required: * If there is no current directory, FileCore will use <code>$</code> on the default drive. This is the configured default, or the one set by the last [[*Drive]] command * If there is no user root directory set, then references to that directory will use <code>$</code> on the default drive * If there is no library set, then FileCore will try <code>&.Library</code>, <code>$.Library</code> and then the current directory, in that order You can also see [[Service_DiscDismounted]] for more information. <br /> h3(#current). Current Selections The currently selected directory, user root directory and library directory are all stored independently for each FileCore-based filing system. <br /> h4. See also * [[FileCore Overview]] * [[FileCore Technical Details]]