home *** CD-ROM | disk | FTP | other *** search
- | >!DosFS.ReadMe1
-
- DOCUMENTATION OF DosFS MODULE
- -----------------------------
-
- Author : Rob Schrauwen
- Acknowledgement: A few important routines were programmed by
- Erik Admiraal
- Remark : This documentation applies to versions 1.20 or later.
- Earlier versions did not implement a full filing system.
-
- © R. Schrauwen 1990
-
-
- PUBLIC DOMAIN STATUS
-
- This software is public domain. It may be copied and given away, provided
- that the *complete* !DosFS application directory is copied.
-
-
- DOSFS
-
- DosFS is a filing system which is able to read and write RSDOS (i.e. MSDOS
- and Atari ST-compatible) floppy discs.
-
- The DosFS module is a real filing system, like adfs:, ram:, scsi: etc.. It
- can be used from the desktop as well as outside the desktop. For example,
- you can type
-
- *. dosfs:
-
- to get a catalogue of the root directory;
-
- *dump dosfs::fred.$.jim
-
- to see the contents the file jim in the root directory of the disc fred;
- in Basic you can type
-
- x%=OPENUP("dosfs:sheila");
-
- and so on.
-
- DosFS has to interact with RiscOS using RiscOS's rules and conventions. This
- gives some discrepancies compared to the use on an MSDOS machine:
-
- 1) File names: The RiscOS rules apply. Hence $ denotes the root directory
- and dots are used to separate directories in a path name. In RiscOS there
- are no extensions. A separator, called the ExtSep fulfils the role of the
- dot which in Dos separates file name and extension. The ExtSep defaults
- to "_", but this can be changed (e.g. if a filename contains "_", you
- might find it useful to change the ExtSep into something else).
-
- Examples:
- \CONFIG.SYS is called dosfs:$.CONFIG_SYS under DosFS.
- \DIR\FILE.EXT is called dosfs:$.DIR.FILE_EXT under DosFS.
- \AUTOEXEC.BAT is called dosfs:$.AUTOEXEC_BAT, but is also possible
- to use AUTOEXECBAT.
-
- A problem is that file names may become longer than the 10 characters
- allowed by existing filing systems. Note that on the command line, files
- can be accessed at all times, since the 10 characters are not a limitation
- of Risc-OS but only of the existing filing systems. It is not the task of
- DosFS to cut file names, it should always provide a 1-1 mapping of names
- under both systems. Therefore copying a file whose name hase 12 characters
- to adfs: will result in a Bad Name error given by adfs: and not by File-
- Switch. BUT the DosFS-Filer provides several name conversions, see
- !DosFS.ReadMe2.
-
- 2) File types: Dos does not support file types. DosFS gives all files the
- type DosFile (&111) because it cannot know which file type is meant.
- The DosFS philosophy is, that DosFS cannot know the file type, but that
- programs working with DosFS might deduce filetypes e.g. from the file's
- extension. For example, the DosFS-Filer uses this. DosFS itself *must*
- treat all files equally.
-
- 3) Disc names: RiscOS uses disc names extensively. DosFS uses the volume
- label as disc name. Some DosFS-operations will complain if your disc does
- not have a volume label. NOTE: this name is the only reference that
- DosFS uses, so two discs with the same name will not be distinguished!
- You can access a disc in the usual way:
-
- *. dosfs::volume.$.dir
-
- will give a catalogue of the directory dir on a disc called 'volume'.
- Since UpCalls are fully implemented, DosFS will prompt for disc changes
- if necessary.
-
- 4) Access information: Risc-OS and Dos do not have the same possibilities
- for access information. On DosFS you always have read-access. The read-
- only attribute is observed. Hidden files appear as "locked", but other
- files cannot be locked against deletion.
-
- 5) Ownership of the floppy drive: ADFS thinks it owns the floppy drive. If
- you by accident try to access a DosFS disc under ADFS you will get the
- "Bad free space map" error. The other way around, you will get the "Unable
- to read disc" error of DosFS after prompting for (a sometimes completely
- irrelevant) disc. You will hear the drive try three times, which is one
- of the *many* "features" of FileSwitch which the user thinks are strange
- properties of DosFS.
-
- The philosophy of DosFS is that it cannot assume anything of a file that
- is not supported by Dos. For example, as a filing system, DosFS will never
- convert end-of-line characters of a text file: suppose you use an SWI to
- determine the file's length, then DosFS won't of course count the carriage
- returns in the file and subtract that from the length as stored in the
- directory. Other ADFS--Dos transfer utilities, which are only programs, can
- do this. Obviously, the DosFS-Filer (see ReadMe2) supports this, too.
-
-
- COMMANDS PROVIDED
-
- Apart from the commands implemented in order to serve FileSwitch, including
- almost all filing system commands (see further below), DosFS implements
- the follwing *commands:
-
- *BytesFree: Shows the number of bytes free on an RSDOS disc.
- *DosFS : Selects DosFS as the current filing system (cf. *ADFS)
- *DosMap : Shows a list of free clusters on an RSDOS disc.
- *DosVolume: Changes the name (volume label) of an RSDOS disc.
- *ExtSep : Shows or changes the current extension separator used to
- separate the file name and the extension. Default "_".
-
-
- RESTRICTIONS
-
- 1) Only 720K floppy discs in drive 0 are supported. Other floppies and drives
- could be supported, but I cannot test this. The hard disc is not supported
- either.
-
- 2) Copying from DosFS to adfs::0 (the same drive) won't work unless the P
- (prompt) option is used. This is because adfs will hasten to access the
- disc before you get the chance to remove it.
-
- 3) DosFS supports "buffered files" (cf. PRM vol 3), for ease of implemen-
- tation. Unfortunately, FileSwitch does not like to have more than one
- buffer for DosFS, so some operations involving TWO files open on DosFS
- ONLY, take a *very* long time to complete (one on DosFS and one somewhere
- else works fine).
-
-
- OPERATIONS SUPPORTED
-
- DosFS supports almost ALL sensible FileSwitch operations.
- NOT supported are library directories, boot options and "directory
- contexts".
-
- Note that older versions of DosFS had many more restrictions, often resulting
- in the dreaded "DosFS does not support this operation" error.
-
-
- TECHNICAL DETAILS, WARNINGS & PECULIARITIES
-
- -- A DosFS file name consists of the name, the ExtSep character, and
- the extension. RiscOS's rules always apply, and there is always a
- 1-1 mapping of files. Note that from adfs to dosfs there is no problem
- in the length of the file names. This is because DosFS allows the user
- to omit the ExtSep whenever a file has a 8-character part before the
- extension. In the command line you can always use filenames as long as
- you like. In the Filer, renaming of files is possible even if the
- 'Not a heap block' message is given (just ignore this). If you want to
- overcome these problems, you can always use the transfer icon provided
- by the desktop.
-
- -- A DosFS path name follows the rules of RiscOS, so "." is used to
- separate directory names, not "\". A disc name, prepended with ":" can
- be included. Wildcarded names also follow the rules of RiscOS. In
- particular, file* matches file1, but also file1_abc (where abc
- is an extension). Of course file*a_* does NOT match fileb_ext
- (try this on an MSDOS machine :-))
-
- -- Subdirectories can be of arbitrary length. Note, however, that
- a very large subdirectory may cause a 'No room in RMA' error,
- if claiming more memory to load the subdirectory fails.
- [Very large is in this case 'larger than the root directory'
- (which, allowing for "." and "..", corresponds to 112 files in a
- subdirectory)]. In general, DosFS claims 6.25K memory for workspace,
- FAT and directories.
-
- -- To speed up some operations, it is assumed that the user never
- removes the disc if the light is still on. If someone knows how to
- intercept the DiscChanged-DeviceVector, I would be glad to hear;
- in that case DosFS could implement a really good UpCall.
-
- -- Sometimes in error conditions, DosFS will UpCall to insert a disc
- when you don't want that. Press Cancel, or Escape when outside the
- desktop, until you get "Unable to read disc" (DosFS's universal
- error message).
-
- -- There are programs that mistakenly reserve not more than 10 characters
- for a file name. Even the SharedCLibrary does not reserve enough
- characters. This means that if you try to load directly from the
- Dos-disc (without piping through the DosFS-Filer's transfer icon), these
- programs will fail. With DosFS a maximum-length name such as AUTOEXEC_BAT
- has 12 characters, excluding termination character.
-
- -- If you copy an application directory to a Dos disc, then it is possible
- that the Filer shows the correct sprite. Double clicking does not run
- the program, because in reality all files have lost their types.
-
- The following comments follow the implementation rules of PRM/3, pages
- 973--999.
-
- -- DosFS can have 8 files open. Note that your disc *must* have a volume
- label to enable opening a file. Operations such as *Type, *Dump and
- *Build use this. Also *Copy sometimes makes use of this. If a file is
- opened for output or update, the length of the file will always reflect
- the allocated disc space which is useful in case something goes wrong
- (Dos itself does not always do this).
-
- -- BPut and BGet are supported. FileSwitch unfortunately maintains only
- one buffer for DosFS. This means that if two files are open on DosFS
- FileSwitch will urge DosFS to perform extensive buffer swapping: in
- order to copy n bytes 2n disc operations are performed. In
- a future release, DosFS will provide its own buffer for input files.
- Transferring bytes to or from another filing system works OK.
-
- -- The access attributes are translated as follows: hidden=LR, read only
- =R. Directories are never locked. Changing attributes *only* looks
- for the presence of the "W" attribute in *Access, all the other options
- are ignored. In particular you have always read access.
-
- -- Files are always time stamped and have file type &111 (DosFile).
- Load and execution addresses are not supported.
-
- -- Observe that there is a difference between *dosfs:dir $ and *dir dosfs:$
- (some operations can be prefixed with dosfs:, such as *dosfs:close).
-
-
- If you have any comments or remarks, please contact me.
-
- Rob Schrauwen
- Email: schrauw@math.ruu.nl
-
- -----------------------------------------------------------------------------
- DISCLAIMER
-
- This module has been thoroughly tested. However, in no circumstances
- the author will be liable for any damage or loss of data, etc..
- RS
-
-