TABLE OF CONTENTS


LibMagic/magic_set [ Types ]

[ Top ] [ LibMagic ] [ Types ]

FUNCTION

 Used to store Magic data

SOURCE

   type magic_set is null record;

LibMagic/magic_t [ Types ]

[ Top ] [ LibMagic ] [ Types ]

FUNCTION

 Used as pointer to the Magic data

SOURCE

   type magic_t is access all magic_set;

LibMagic/Initialized [ Variables ]

[ Top ] [ LibMagic ] [ Variables ]

FUNCTION

 If true, libmagic was succesfully initialized. Default is false.

SOURCE

   Initialized: Boolean := False;

LibMagic/MagicData [ Variables ]

[ Top ] [ LibMagic ] [ Variables ]

FUNCTION

 Pointer to the Magic data

SOURCE

   MagicData: magic_t;

LibMagic/magic_close [ Subprograms ]

[ Top ] [ LibMagic ] [ Subprograms ]

FUNCTION

 Binding to the C function

SOURCE

   procedure magic_close(arg1: magic_t) with
      Import => True,
      Convention => C,
      External_Name => "magic_close";

PARAMETERS

 arg1 -  Pointer to the Magic data

LibMagic/magic_file [ Subprograms ]

[ Top ] [ LibMagic ] [ Subprograms ]

FUNCTION

 Binding to the C function

SOURCE

   function magic_file(arg1: magic_t; arg2: chars_ptr) return chars_ptr with
      Import => True,
      Convention => C,
      External_Name => "magic_file";

PARAMETERS

 arg1 - Pointer to the Magic data
 arg2 - Full path the the file which will be checked

RESULT

 MIME Type of selected file

LibMagic/magic_load [ Subprograms ]

[ Top ] [ LibMagic ] [ Subprograms ]

FUNCTION

 Binding to the C function

SOURCE

   function magic_load(arg1: magic_t; arg2: chars_ptr) return int with
      Import => True,
      Convention => C,
      External_Name => "magic_load";

PARAMETERS

 arg1 - Pointer to the Magic data
 arg2 - unused, set to Null_Ptr

RESULT

 0 if data was loaded

LibMagic/magic_open [ Subprograms ]

[ Top ] [ LibMagic ] [ Subprograms ]

FUNCTION

 Binding to the C function

SOURCE

   function magic_open(arg1: int) return magic_t with
      Import => True,
      Convention => C,
      External_Name => "magic_open";

PARAMETERS

 arg1 - Type of data to retrieve

RESULT

 New pointer to the magic data
>