MIME types and extensions

Mr. B.B.C.
  • Mr. B.B.C.
    Mr. B.B.C.

    file types should be recognized only by the extension.

    users/.../ini/mime.ini contains file type informations.

    name="hypertext document"
    description="documents that can be viewed in the Internet"
    edit="notepad.prg \"%file%\",edit.con \"%file%\""

    name is shown of some file browsers; description perhaps from 'help'; mime is used for Internet file conversions, e.g. read by a Webserver.

    open & edit are actions. There are following default actions: view, open, edit, print, import;

    The first defined action is always the default action (double click/return).

    You can define new actions and give them a common name at the beginning of mime.ini:

    view="display it"
    open="open it"
    import="convert for ModulOS"

    This is important for localization. As well the action names must be one word.


    .txt/.text: text files
    .html/.htm: HTML files
    .ini: INI files (program settings)
    .ins: INS files (setup/installation files/scripts)
    .pac: installation package; BZIP archive with a install.ins - comparable to RPM packages

    .fld - folders, not always like normal files; containing filenames, cluster references, attributes, additional informations, access rights/filters; on some file systems .access (".xxx" => inaccessible file) for user rights.

    .mdl: Module (dynamic library)
    .pic: raw picture file in VGA formar, only format, colour depth, picture

    .bat: batch script
    .con: console application
    .prg: GEM application

    • Mr. B.B.C.
      Mr. B.B.C.

      There shall be a kind of system instruction "bus" or "pipe".

      You can enter e.g. "open readme.txt" (or just "readme.txt" if open is default) in the console to get the default program for this file type.

      First the console searches of course for a "open.con" (local and in /OS/command).

      Yet another file type: .cat (console app taking parameter). First: it's a simple batch file like this:

      ifdef %file%
        ifdef %parameter%
          doer.con +r %file% %parameter%
          doer.con +r %file% -a -i
        ifdef %parameter%
          doer.con %parameter%
          doer.con +n -a -i

      Second: it is only for use under a GUI. If the GUI should run a console app, it determines, whether there is a cat file in the same directory.

      If in this file stands "demandparameter! = true" the GUI opens a dialogue box to enter program parameters.

      %file% is only defined if you drag a file on the batch file (or the depending console file)

      %parameter% is entered in the dialogue box.

      in the console batch files only assume a file as %file% if you lead the path and file name by a "--file"