------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009 Vadim Godunko <vgodunko@gmail.com>                      --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
pragma Style_Checks ("NM32766");
with Qt_Ada.Internals.Boolean_Conversions;
with System.Address_To_Access_Conversions;

package body Qt4.File_Infos is

   function initialize_QFileInfo
    (Storage : System.Address)
      return Internals.QFileInfo_Access;
   pragma Import (C, initialize_QFileInfo, "__QtAda_inititialize_QFileInfo");

   function initialize_QFileInfo_QStringCR
    (Storage : System.Address;
     File : Qt4.Strings.Internals.QString_Access)
      return Internals.QFileInfo_Access;
   pragma Import (C, initialize_QFileInfo_QStringCR, "__QtAda_inititialize_QFileInfo_QStringCR");

   function initialize_QFileInfo_QDirCR_QStringCR
    (Storage : System.Address;
     Dir : Qt4.Dirs.Internals.QDir_Access;
     File : Qt4.Strings.Internals.QString_Access)
      return Internals.QFileInfo_Access;
   pragma Import (C, initialize_QFileInfo_QDirCR_QStringCR, "__QtAda_inititialize_QFileInfo_QDirCR_QStringCR");

   function adjust_QFileInfo
    (Storage : System.Address;
     From    : Internals.QFileInfo_Access)
       return Internals.QFileInfo_Access;
   pragma Import (C, adjust_QFileInfo, "__QtAda_adjust_QFileInfo");

   procedure finalize_QFileInfo (Object : Internals.QFileInfo_Access);
   pragma Import (C, finalize_QFileInfo, "__QtAda_finalize_QFileInfo");

   procedure QFileInfo_absoluteDir
    (Returns : Qt4.Dirs.Internals.QDir_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_absoluteDir, "__QtAda_QFileInfo_absoluteDir_Q");

   procedure QFileInfo_absoluteFilePath
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_absoluteFilePath, "__QtAda_QFileInfo_absoluteFilePath_Q");

   procedure QFileInfo_absolutePath
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_absolutePath, "__QtAda_QFileInfo_absolutePath_Q");

   procedure QFileInfo_baseName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_baseName, "__QtAda_QFileInfo_baseName_Q");

   procedure QFileInfo_bundleName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_bundleName, "__QtAda_QFileInfo_bundleName_Q");

   function QFileInfo_caching
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_caching, "__QtAda_QFileInfo_caching_Q");

   procedure QFileInfo_canonicalFilePath
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_canonicalFilePath, "__QtAda_QFileInfo_canonicalFilePath_Q");

   procedure QFileInfo_canonicalPath
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_canonicalPath, "__QtAda_QFileInfo_canonicalPath_Q");

   procedure QFileInfo_completeBaseName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_completeBaseName, "__QtAda_QFileInfo_completeBaseName_Q");

   procedure QFileInfo_completeSuffix
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_completeSuffix, "__QtAda_QFileInfo_completeSuffix_Q");

   procedure QFileInfo_created
    (Returns : Qt4.Date_Times.Internals.QDateTime_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_created, "__QtAda_QFileInfo_created_Q");

   procedure QFileInfo_dir
    (Returns : Qt4.Dirs.Internals.QDir_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_dir, "__QtAda_QFileInfo_dir_Q");

   function QFileInfo_exists
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_exists, "__QtAda_QFileInfo_exists_Q");

   procedure QFileInfo_fileName
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_fileName, "__QtAda_QFileInfo_fileName_Q");

   procedure QFileInfo_filePath
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_filePath, "__QtAda_QFileInfo_filePath_Q");

   procedure QFileInfo_group
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_group, "__QtAda_QFileInfo_group_Q");

   function QFileInfo_groupId
    (Self : Internals.QFileInfo_Access)
       return Qt4.Q_Unsigned_Integer;
   pragma Import (C, QFileInfo_groupId, "__QtAda_QFileInfo_groupId_Q");

   function QFileInfo_isAbsolute
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isAbsolute, "__QtAda_QFileInfo_isAbsolute_Q");

   function QFileInfo_isBundle
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isBundle, "__QtAda_QFileInfo_isBundle_Q");

   function QFileInfo_isDir
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isDir, "__QtAda_QFileInfo_isDir_Q");

   function QFileInfo_isExecutable
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isExecutable, "__QtAda_QFileInfo_isExecutable_Q");

   function QFileInfo_isFile
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isFile, "__QtAda_QFileInfo_isFile_Q");

   function QFileInfo_isHidden
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isHidden, "__QtAda_QFileInfo_isHidden_Q");

   function QFileInfo_isReadable
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isReadable, "__QtAda_QFileInfo_isReadable_Q");

   function QFileInfo_isRelative
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isRelative, "__QtAda_QFileInfo_isRelative_Q");

   function QFileInfo_isRoot
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isRoot, "__QtAda_QFileInfo_isRoot_Q");

   function QFileInfo_isSymLink
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isSymLink, "__QtAda_QFileInfo_isSymLink_Q");

   function QFileInfo_isWritable
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_isWritable, "__QtAda_QFileInfo_isWritable_Q");

   procedure QFileInfo_lastModified
    (Returns : Qt4.Date_Times.Internals.QDateTime_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_lastModified, "__QtAda_QFileInfo_lastModified_Q");

   procedure QFileInfo_lastRead
    (Returns : Qt4.Date_Times.Internals.QDateTime_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_lastRead, "__QtAda_QFileInfo_lastRead_Q");

   function QFileInfo_makeAbsolute
    (Self : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QFileInfo_makeAbsolute, "__QtAda_QFileInfo_makeAbsolute");

   procedure QFileInfo_owner
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_owner, "__QtAda_QFileInfo_owner_Q");

   function QFileInfo_ownerId
    (Self : Internals.QFileInfo_Access)
       return Qt4.Q_Unsigned_Integer;
   pragma Import (C, QFileInfo_ownerId, "__QtAda_QFileInfo_ownerId_Q");

   procedure QFileInfo_path
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_path, "__QtAda_QFileInfo_path_Q");

   procedure QFileInfo_refresh
    (Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_refresh, "__QtAda_QFileInfo_refresh");

   procedure QFileInfo_setCaching_bool
    (Self : Internals.QFileInfo_Access;
     Enable : Interfaces.C.unsigned);
   pragma Import (C, QFileInfo_setCaching_bool, "__QtAda_QFileInfo_setCaching_bool");

   procedure QFileInfo_setFile_QStringCR
    (Self : Internals.QFileInfo_Access;
     File : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QFileInfo_setFile_QStringCR, "__QtAda_QFileInfo_setFile_QStringCR");

   procedure QFileInfo_setFile_QDirCR_QStringCR
    (Self : Internals.QFileInfo_Access;
     Dir : Qt4.Dirs.Internals.QDir_Access;
     File : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QFileInfo_setFile_QDirCR_QStringCR, "__QtAda_QFileInfo_setFile_QDirCR_QStringCR");

   function QFileInfo_size
    (Self : Internals.QFileInfo_Access)
       return Qt4.Q_Integer_64;
   pragma Import (C, QFileInfo_size, "__QtAda_QFileInfo_size_Q");

   procedure QFileInfo_suffix
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_suffix, "__QtAda_QFileInfo_suffix_Q");

   procedure QFileInfo_symLinkTarget
    (Returns : Qt4.Strings.Internals.QString_Access;
     Self : Internals.QFileInfo_Access);
   pragma Import (C, QFileInfo_symLinkTarget, "__QtAda_QFileInfo_symLinkTarget_Q");

   function eq_QFileInfoCR
    (Self : Internals.QFileInfo_Access;
     Fileinfo : Internals.QFileInfo_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QFileInfoCR, "__QtAda_QFileInfo_eq_QFileInfoCR_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_File_Info) is
   begin
      Self.Object := adjust_QFileInfo (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_File_Info) is
   begin
      if not Self.Wrapper then
         finalize_QFileInfo (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_File_Info) is
      use type Internals.QFileInfo_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QFileInfo (Self.Storage'Address);
      end if;
   end Initialize;

   ------------
   -- Create --
   ------------

   function Create
    (File : Qt4.Strings.Q_String'Class)
       return Q_File_Info
   is
   begin
      return Self : Q_File_Info
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QFileInfo_QStringCR (Self.Storage'Address, Qt4.Strings.Internals.QString_View (File));
      end return;
   end Create;

   ------------
   -- Create --
   ------------

   function Create
    (Dir : Qt4.Dirs.Q_Dir'Class;
     File : Qt4.Strings.Q_String'Class)
       return Q_File_Info
   is
   begin
      return Self : Q_File_Info
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QFileInfo_QDirCR_QStringCR (Self.Storage'Address, Qt4.Dirs.Internals.QDir_View (Dir), Qt4.Strings.Internals.QString_View (File));
      end return;
   end Create;

   ------------------
   -- Absolute_Dir --
   ------------------

   function Absolute_Dir
    (Self : Q_File_Info'Class)
       return Qt4.Dirs.Q_Dir
   is
   begin
      return Returns : Qt4.Dirs.Q_Dir do
         QFileInfo_absoluteDir (Qt4.Dirs.Internals.QDir_View (Returns), Self.Object);
      end return;
   end Absolute_Dir;

   ------------------------
   -- Absolute_File_Path --
   ------------------------

   function Absolute_File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_absoluteFilePath (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Absolute_File_Path;

   -------------------
   -- Absolute_Path --
   -------------------

   function Absolute_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_absolutePath (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Absolute_Path;

   ---------------
   -- Base_Name --
   ---------------

   function Base_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_baseName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Base_Name;

   -----------------
   -- Bundle_Name --
   -----------------

   function Bundle_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_bundleName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Bundle_Name;

   -------------
   -- Caching --
   -------------

   function Caching
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_caching (Self.Object), 0);
   end Caching;

   -------------------------
   -- Canonical_File_Path --
   -------------------------

   function Canonical_File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_canonicalFilePath (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Canonical_File_Path;

   --------------------
   -- Canonical_Path --
   --------------------

   function Canonical_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_canonicalPath (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Canonical_Path;

   ------------------------
   -- Complete_Base_Name --
   ------------------------

   function Complete_Base_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_completeBaseName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Complete_Base_Name;

   ---------------------
   -- Complete_Suffix --
   ---------------------

   function Complete_Suffix
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_completeSuffix (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Complete_Suffix;

   -------------
   -- Created --
   -------------

   function Created
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time
   is
   begin
      return Returns : Qt4.Date_Times.Q_Date_Time do
         QFileInfo_created (Qt4.Date_Times.Internals.QDateTime_View (Returns), Self.Object);
      end return;
   end Created;

   ---------
   -- Dir --
   ---------

   function Dir
    (Self : Q_File_Info'Class)
       return Qt4.Dirs.Q_Dir
   is
   begin
      return Returns : Qt4.Dirs.Q_Dir do
         QFileInfo_dir (Qt4.Dirs.Internals.QDir_View (Returns), Self.Object);
      end return;
   end Dir;

   ------------
   -- Exists --
   ------------

   function Exists
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_exists (Self.Object), 0);
   end Exists;

   ---------------
   -- File_Name --
   ---------------

   function File_Name
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_fileName (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end File_Name;

   ---------------
   -- File_Path --
   ---------------

   function File_Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_filePath (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end File_Path;

   -----------
   -- Group --
   -----------

   function Group
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_group (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Group;

   --------------
   -- Group_Id --
   --------------

   function Group_Id
    (Self : Q_File_Info'Class)
       return Qt4.Q_Unsigned_Integer
   is
   begin
      return QFileInfo_groupId (Self.Object);
   end Group_Id;

   -----------------
   -- Is_Absolute --
   -----------------

   function Is_Absolute
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isAbsolute (Self.Object), 0);
   end Is_Absolute;

   ---------------
   -- Is_Bundle --
   ---------------

   function Is_Bundle
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isBundle (Self.Object), 0);
   end Is_Bundle;

   ------------
   -- Is_Dir --
   ------------

   function Is_Dir
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isDir (Self.Object), 0);
   end Is_Dir;

   -------------------
   -- Is_Executable --
   -------------------

   function Is_Executable
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isExecutable (Self.Object), 0);
   end Is_Executable;

   -------------
   -- Is_File --
   -------------

   function Is_File
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isFile (Self.Object), 0);
   end Is_File;

   ---------------
   -- Is_Hidden --
   ---------------

   function Is_Hidden
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isHidden (Self.Object), 0);
   end Is_Hidden;

   -----------------
   -- Is_Readable --
   -----------------

   function Is_Readable
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isReadable (Self.Object), 0);
   end Is_Readable;

   -----------------
   -- Is_Relative --
   -----------------

   function Is_Relative
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isRelative (Self.Object), 0);
   end Is_Relative;

   -------------
   -- Is_Root --
   -------------

   function Is_Root
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isRoot (Self.Object), 0);
   end Is_Root;

   -----------------
   -- Is_Sym_Link --
   -----------------

   function Is_Sym_Link
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isSymLink (Self.Object), 0);
   end Is_Sym_Link;

   -----------------
   -- Is_Writable --
   -----------------

   function Is_Writable
    (Self : Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_isWritable (Self.Object), 0);
   end Is_Writable;

   -------------------
   -- Last_Modified --
   -------------------

   function Last_Modified
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time
   is
   begin
      return Returns : Qt4.Date_Times.Q_Date_Time do
         QFileInfo_lastModified (Qt4.Date_Times.Internals.QDateTime_View (Returns), Self.Object);
      end return;
   end Last_Modified;

   ---------------
   -- Last_Read --
   ---------------

   function Last_Read
    (Self : Q_File_Info'Class)
       return Qt4.Date_Times.Q_Date_Time
   is
   begin
      return Returns : Qt4.Date_Times.Q_Date_Time do
         QFileInfo_lastRead (Qt4.Date_Times.Internals.QDateTime_View (Returns), Self.Object);
      end return;
   end Last_Read;

   -------------------
   -- Make_Absolute --
   -------------------

   function Make_Absolute
    (Self : not null access Q_File_Info'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QFileInfo_makeAbsolute (Self.Object), 0);
   end Make_Absolute;

   -----------
   -- Owner --
   -----------

   function Owner
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_owner (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Owner;

   --------------
   -- Owner_Id --
   --------------

   function Owner_Id
    (Self : Q_File_Info'Class)
       return Qt4.Q_Unsigned_Integer
   is
   begin
      return QFileInfo_ownerId (Self.Object);
   end Owner_Id;

   ----------
   -- Path --
   ----------

   function Path
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_path (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Path;

   -------------
   -- Refresh --
   -------------

   procedure Refresh
    (Self : in out Q_File_Info'Class)
   is
   begin
      QFileInfo_refresh (Self.Object);
   end Refresh;

   -----------------
   -- Set_Caching --
   -----------------

   procedure Set_Caching
    (Self : in out Q_File_Info'Class;
     Enable : Boolean)
   is
   begin
      QFileInfo_setCaching_bool (Self.Object, Qt_Ada.Internals.Boolean_Conversions.To_unsigned (Enable));
   end Set_Caching;

   --------------
   -- Set_File --
   --------------

   procedure Set_File
    (Self : in out Q_File_Info'Class;
     File : Qt4.Strings.Q_String'Class)
   is
   begin
      QFileInfo_setFile_QStringCR (Self.Object, Qt4.Strings.Internals.QString_View (File));
   end Set_File;

   --------------
   -- Set_File --
   --------------

   procedure Set_File
    (Self : in out Q_File_Info'Class;
     Dir : Qt4.Dirs.Q_Dir'Class;
     File : Qt4.Strings.Q_String'Class)
   is
   begin
      QFileInfo_setFile_QDirCR_QStringCR (Self.Object, Qt4.Dirs.Internals.QDir_View (Dir), Qt4.Strings.Internals.QString_View (File));
   end Set_File;

   ----------
   -- Size --
   ----------

   function Size
    (Self : Q_File_Info'Class)
       return Qt4.Q_Integer_64
   is
   begin
      return QFileInfo_size (Self.Object);
   end Size;

   ------------
   -- Suffix --
   ------------

   function Suffix
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_suffix (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Suffix;

   ---------------------
   -- Sym_Link_Target --
   ---------------------

   function Sym_Link_Target
    (Self : Q_File_Info'Class)
       return Qt4.Strings.Q_String
   is
   begin
      return Returns : Qt4.Strings.Q_String do
         QFileInfo_symLinkTarget (Qt4.Strings.Internals.QString_View (Returns), Self.Object);
      end return;
   end Sym_Link_Target;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_File_Info;
     Fileinfo : Q_File_Info)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QFileInfoCR (Self.Object, Fileinfo.Object), 0);
   end "=";

   ---------------
   -- Internals --
   ---------------

   package body Internals is

   --------------------
   -- QFileInfo_View --
   --------------------

      function QFileInfo_View
       (Item : Q_File_Info'Class)
          return QFileInfo_Access
      is
      begin
         return Item.Object;
      end QFileInfo_View;

      package QFileInfo_Conversions is
        new System.Address_To_Access_Conversions
             (QFileInfo);

   -------------------------
   -- QFileInfoTo_Pointer --
   -------------------------

      function To_Pointer
       (Address : System.Address)
          return QFileInfo_Access
      is
      begin
         return
           QFileInfo_Access
            (QFileInfo_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   -------------------------
   -- QFileInfoTo_Address --
   -------------------------

      function To_Address
       (Pointer : QFileInfo_Access)
          return System.Address
      is
      begin
         return
           QFileInfo_Conversions.To_Address
            (QFileInfo_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QFileInfo_Access)
          return Q_File_Info
      is
      begin
         return Q_File_Info'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   end Internals;

end Qt4.File_Infos;
