    {-# LINE 2 "./System/GIO/File/FileInfo.chs" #-}
    -- GIMP Toolkit (GTK) Binding for Haskell: binding to gio -*-haskell-*-
    --
    -- Author : Andy Stewart
    -- Created: 30-Apirl-2010
    --
    -- Copyright (c) 2010 Andy Stewart
    --
    -- This library is free software: you can redistribute it and/or
    -- modify it under the terms of the GNU Lesser General Public License
    -- as published by the Free Software Foundation, either version 3 of
    -- the License, or (at your option) any later version.
    --
    -- This library is distributed in the hope that it will be useful,
    -- but WITHOUT ANY WARRANTY; without even the implied warranty of
    -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    -- Lesser General Public License for more details.
    --
    -- You should have received a copy of the GNU Lesser General Public
    -- License along with this program. If not, see
    -- <http:
    --
    -- GIO, the C library which this Haskell library depends on, is
    -- available under LGPL Version 2. The documentation included with
    -- this library is based on the original GIO documentation.
    --
    -- | Maintainer : gtk2hs-devel@lists.sourceforge.net
    -- Stability : alpha
    -- Portability : portable (depends on GHC)
    module System.GIO.File.FileInfo (
    -- * Details
    --
    -- | Functionality for manipulating basic metadata for files. 'FileInfo' implements methods for getting
    -- information that all files should contain, and allows for manipulation of extended attributes.
    --
    -- See 'FileAttribute' for more information on how GIO handles file attributes.
    --
    -- To obtain a 'FileInfo' for a 'File', use 'fileQueryInfo'. To obtain a
    -- 'FileInfo' for a file input or output stream, use 'fileInputStreamQueryInfo' or
    -- 'fileOutputStreamQueryInfo'.
    --
    -- To change the actual attributes of a file, you should then set the attribute in the 'FileInfo' and
    -- call 'fileSetAttributesFromInfo' on a 'File'.
    --
    -- However, not all attributes can be changed in the file. For instance, the actual size of a file
    -- cannot be changed via 'fileInfoSetSize' and
    -- 'fileQueryWritableNamespaces' to discover the settable attributes of a particular file at
    -- runtime.
    --
    -- 'FileAttributeMatcher' allows for searching through a 'FileInfo' for attributes.

    -- * Types
        FileInfo(..),
        FileInfoClass,

    -- * Enums,
        FileAttributeStatus (..),

    -- * Methods
        fileInfoNew,
        fileInfoDup,
        fileInfoCopyInto,
        fileInfoHasAttribute,

        fileInfoHasNamespace,

        fileInfoListAttributes,
        fileInfoGetAttributeType,
        fileInfoRemoveAttribute,
        fileInfoGetAttributeAsString,
        fileInfoGetAttributeStatus,
        fileInfoGetAttributeString,

        fileInfoGetAttributeStringList,

        fileInfoGetAttributeByteString,
        fileInfoGetAttributeBool,
        fileInfoGetAttributeWord32,
        fileInfoGetAttributeInt32,
        fileInfoGetAttributeWord64,
        fileInfoGetAttributeInt64,
        fileInfoGetAttributeObject,

        fileInfoSetAttributeStatus,

        fileInfoSetAttributeString,

        fileInfoSetAttributeStringList,

        fileInfoSetAttributeByteString,
        fileInfoSetAttributeBool,
        fileInfoSetAttributeWord32,
        fileInfoSetAttributeInt32,
        fileInfoSetAttributeWord64,
        fileInfoSetAttributeInt64,
        fileInfoSetAttributeObject,

        fileInfoClearStatus,
        fileInfoGetFileType,
        fileInfoGetIsHidden,
        fileInfoGetIsBackup,
        fileInfoGetIsSymlink,
        fileInfoGetName,
        fileInfoGetDisplayName,
        fileInfoGetEditName,
        fileInfoGetIcon,
        fileInfoGetContentType,
        fileInfoGetModificationTime,
        fileInfoGetSize,
        fileInfoGetSymlinkTarget,
        fileInfoGetEtag,
        fileInfoGetSortOrder,
        fileInfoUnsetAttributeMask,
        fileInfoSetFileType,
        fileInfoSetIsHidden,
        fileInfoSetIsSymlink,
        fileInfoSetName,
        fileInfoSetDisplayName,
        fileInfoSetEditName,
        fileInfoSetIcon,
        fileInfoSetContentType,
        fileInfoSetModificationTime,
        fileInfoSetSize,

        -- 'fileInfoSetSymlinkTarget' use *static string* that we don't understand the purpose of this function.
        -- If someone know how to use it, uncomment it and fix documentation.
        -- fileInfoSetSymlinkTarget,

        fileInfoSetSortOrder,
        ) where

    import Control.Monad

    import Data.ByteString (ByteString)
    import Data.ByteString (useAsCString)
    import Data.ByteString.Unsafe (unsafePackCStringFinalizer)
    import System.Glib.FFI
    import System.Glib.Flags
    import System.Glib.GError
    import System.Glib.UTFString
    import System.Glib.GObject
    import System.Glib.GDateTime

    import System.GIO.Enums
    import System.GIO.File.FileAttribute
    import System.GIO.Types
    {-# LINE 147 "./System/GIO/File/FileInfo.chs" #-}

    {-# LINE 149 "./System/GIO/File/FileInfo.chs" #-}

    -- | Creates a new file info structure.
    fileInfoNew :: IO FileInfo
    fileInfoNew :: IO FileInfo
    fileInfoNew =
        (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
    -> IO (Ptr FileInfo) -> IO FileInfo
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    wrapNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
    forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
    mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
    -> IO (Ptr FileInfo) -> IO FileInfo
    forall a b. (a -> b) -> a -> b
    $
        IO (Ptr FileInfo)
    g_file_info_new
    {-# LINE 155 "./System/GIO/File/FileInfo.chs" #-}

    -- | Duplicates a file info structure.
    fileInfoDup :: FileInfoClass info => info -> IO FileInfo
    fileInfoDup :: forall info. FileInfoClass info => info -> IO FileInfo
    fileInfoDup info
    info =
        (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
    -> IO (Ptr FileInfo) -> IO FileInfo
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    wrapNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
    forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
    mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
    -> IO (Ptr FileInfo) -> IO FileInfo
    forall a b. (a -> b) -> a -> b
    $
        (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo
    -> (Ptr FileInfo -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
    -> (Ptr FileInfo -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO (Ptr FileInfo)
    g_file_info_dup Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Copies all of the 'FileAttributes' from @srcInfo@ to @destInfo@.
    fileInfoCopyInto :: (FileInfoClass srcInfo, FileInfoClass destInfo)
     => srcInfo -- ^ @srcInfo@ source to copy attributes from.
     -> destInfo -- ^ @destInfo@ destination to copy attributes to.
     -> IO ()
    fileInfoCopyInto :: forall srcInfo destInfo.
    (FileInfoClass srcInfo, FileInfoClass destInfo) =>
    srcInfo -> destInfo -> IO ()
    fileInfoCopyInto srcInfo
    srcInfo destInfo
    destInfo =
      (\(FileInfo ForeignPtr FileInfo
    arg1) (FileInfo ForeignPtr FileInfo
    arg2) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg2 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr2 ->Ptr FileInfo -> Ptr FileInfo -> IO ()
    g_file_info_copy_into Ptr FileInfo
    argPtr1 Ptr FileInfo
    argPtr2) (srcInfo -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo srcInfo
    srcInfo) (destInfo -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo destInfo
    destInfo)

    -- | Checks if a file info structure has an attribute named attribute.
    fileInfoHasAttribute :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Bool -- ^ returns 'True' if Ginfo has an attribute named attribute, 'False' otherwise.
    fileInfoHasAttribute :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Bool
    fileInfoHasAttribute info
    info string
    attribute =
      CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (CInt -> Bool) -> CInt -> Bool
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_has_attribute Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Checks if a file info structure has an attribute in the specified @nameSpace@.
    fileInfoHasNamespace :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @namespace@ a file namespace key.
     -> Bool -- ^ returns 'True' if Ginfo has an namespace named namespace, 'False' otherwise.
    fileInfoHasNamespace :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Bool
    fileInfoHasNamespace info
    info string
    namespace =
      CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (CInt -> Bool) -> CInt -> Bool
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    namespace ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    namespacePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_has_namespace Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    namespacePtr

    -- | Lists the file info structure's attributes.
    fileInfoListAttributes :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @nameSpace@ a file attribute key's namespace.
     -> IO [string]-- ^ returns a array of strings of all of the possible attribute types for the given @nameSpace@
    fileInfoListAttributes :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO [string]
    fileInfoListAttributes info
    info string
    nameSpace =
      string -> (CString -> IO [string]) -> IO [string]
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    nameSpace ((CString -> IO [string]) -> IO [string])
    -> (CString -> IO [string]) -> IO [string]
    forall a b. (a -> b) -> a -> b
    $ \ CString
    nameSpacePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo
    -> (Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString))
    -> (Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO (Ptr CString)
    g_file_info_list_attributes Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    nameSpacePtr
      IO (Ptr CString) -> (Ptr CString -> IO [string]) -> IO [string]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CString -> IO [string]
    forall s. GlibString s => Ptr CString -> IO [s]
    readUTFStringArray0

    -- | Gets the attribute type for an attribute key.
    fileInfoGetAttributeType :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO FileAttributeType -- ^ returns a 'FileAttributeType' for the given attribute, or 'FileAttributeTypeInvalid' if the key is not set.
    fileInfoGetAttributeType :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO FileAttributeType
    fileInfoGetAttributeType info
    info string
    attribute =
      (CInt -> FileAttributeType) -> IO CInt -> IO FileAttributeType
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> FileAttributeType
    forall a. Enum a => Int -> a
    toEnum (Int -> FileAttributeType)
    -> (CInt -> Int) -> CInt -> FileAttributeType
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO FileAttributeType)
    -> IO CInt -> IO FileAttributeType
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_get_attribute_type Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Removes all cases of attribute from info if it exists.
    fileInfoRemoveAttribute :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO ()
    fileInfoRemoveAttribute :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO ()
    fileInfoRemoveAttribute info
    info string
    attribute =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO ()
    g_file_info_remove_attribute Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets the value of a attribute, formatted as a string. This escapes things as needed to make the
    -- string valid utf8.
    fileInfoGetAttributeAsString :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO string -- ^ returns a UTF-8 string associated with the given attribute.
    fileInfoGetAttributeAsString :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO string
    fileInfoGetAttributeAsString info
    info string
    attribute =
      string -> (CString -> IO string) -> IO string
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO string) -> IO string)
    -> (CString -> IO string) -> IO string
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CString
    g_file_info_get_attribute_as_string Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr
      IO CString -> (CString -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the attribute status for an attribute key.
    fileInfoGetAttributeStatus :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO FileAttributeStatus -- ^ returns a 'FileAttributeStatus' for the given attribute, or 'FileAttributeStatusUnset' if the key is invalid.
    fileInfoGetAttributeStatus :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO FileAttributeStatus
    fileInfoGetAttributeStatus info
    info string
    attribute =
      (CInt -> FileAttributeStatus) -> IO CInt -> IO FileAttributeStatus
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM (Int -> FileAttributeStatus
    forall a. Enum a => Int -> a
    toEnum (Int -> FileAttributeStatus)
    -> (CInt -> Int) -> CInt -> FileAttributeStatus
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (IO CInt -> IO FileAttributeStatus)
    -> IO CInt -> IO FileAttributeStatus
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_get_attribute_status Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets the value of a string attribute.
    fileInfoGetAttributeString :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO string -- ^ returns the contents of the attribute value as a string
    fileInfoGetAttributeString :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO string
    fileInfoGetAttributeString info
    info string
    attribute =
      string -> (CString -> IO string) -> IO string
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO string) -> IO string)
    -> (CString -> IO string) -> IO string
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CString
    g_file_info_get_attribute_string Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr
      IO CString -> (CString -> IO string) -> IO string
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the value of a stringv attribute. If the attribute does not contain a stringv
    fileInfoGetAttributeStringList :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO [string] -- ^ returns the contents of the attribute value as a string list
    fileInfoGetAttributeStringList :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO [string]
    fileInfoGetAttributeStringList info
    info string
    attribute =
      string -> (CString -> IO [string]) -> IO [string]
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO [string]) -> IO [string])
    -> (CString -> IO [string]) -> IO [string]
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo
    -> (Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString))
    -> (Ptr FileInfo -> IO (Ptr CString)) -> IO (Ptr CString)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO (Ptr CString)
    g_file_info_get_attribute_stringv Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr
      IO (Ptr CString) -> (Ptr CString -> IO [string]) -> IO [string]
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= Ptr CString -> IO [string]
    forall s. GlibString s => Ptr CString -> IO [s]
    readUTFStringArray0

    -- | Gets the value of a byte string attribute.
    fileInfoGetAttributeByteString :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO ByteString -- ^ returns the contents of the attribute value as a ByteString
    fileInfoGetAttributeByteString :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO ByteString
    fileInfoGetAttributeByteString info
    info string
    attribute =
      string -> (CString -> IO ByteString) -> IO ByteString
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ByteString) -> IO ByteString)
    -> (CString -> IO ByteString) -> IO ByteString
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr -> do
      CString
    sPtr <- (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CString
    g_file_info_get_attribute_byte_string Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr
      Int
    sLen <- CChar -> CString -> IO Int
    forall a. (Storable a, Eq a) => a -> Ptr a -> IO Int
    lengthArray0 CChar
    0 CString
    sPtr
      Ptr Word8 -> Int -> IO () -> IO ByteString
    unsafePackCStringFinalizer (CString -> Ptr Word8
    forall a b. Ptr a -> Ptr b
    castPtr CString
    sPtr) (Int -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    sLen)
            (Ptr () -> IO ()
    g_free (CString -> Ptr ()
    forall a b. Ptr a -> Ptr b
    castPtr CString
    sPtr))

    -- | Gets the value of a boolean attribute.
    fileInfoGetAttributeBool :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO Bool -- ^ returns the contents of the attribute value as a bool
    fileInfoGetAttributeBool :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO Bool
    fileInfoGetAttributeBool info
    info string
    attribute =
      (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_get_attribute_boolean Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets an Word32 contained within the attribute.
    fileInfoGetAttributeWord32 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO Word32 -- ^ returns the contents of the attribute value as a bool
    fileInfoGetAttributeWord32 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO Word32
    fileInfoGetAttributeWord32 info
    info string
    attribute =
      (CUInt -> Word32) -> IO CUInt -> IO Word32
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CUInt -> Word32
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CUInt -> IO Word32) -> IO CUInt -> IO Word32
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CUInt) -> IO CUInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CUInt) -> IO CUInt)
    -> (CString -> IO CUInt) -> IO CUInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr -> do
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CUInt) -> IO CUInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CUInt) -> IO CUInt)
    -> (Ptr FileInfo -> IO CUInt) -> IO CUInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CUInt
    g_file_info_get_attribute_uint32 Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets an Int32 contained within the attribute.
    fileInfoGetAttributeInt32 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO Int32 -- ^ returns the contents of the attribute value as a bool
    fileInfoGetAttributeInt32 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO Int32
    fileInfoGetAttributeInt32 info
    info string
    attribute =
      (CInt -> Int32) -> IO CInt -> IO Int32
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Int32
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CInt -> IO Int32) -> IO CInt -> IO Int32
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr -> do
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CInt
    g_file_info_get_attribute_int32 Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets an Word64 contained within the attribute.
    fileInfoGetAttributeWord64 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO Word64 -- ^ returns the contents of the attribute value as a bool
    fileInfoGetAttributeWord64 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO Word64
    fileInfoGetAttributeWord64 info
    info string
    attribute =
      (CULong -> Word64) -> IO CULong -> IO Word64
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CULong -> Word64
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CULong -> IO Word64) -> IO CULong -> IO Word64
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CULong) -> IO CULong
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CULong) -> IO CULong)
    -> (CString -> IO CULong) -> IO CULong
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr -> do
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CULong) -> IO CULong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CULong) -> IO CULong)
    -> (Ptr FileInfo -> IO CULong) -> IO CULong
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CULong
    g_file_info_get_attribute_uint64 Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets an Int64 contained within the attribute.
    fileInfoGetAttributeInt64 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO Int64 -- ^ returns the contents of the attribute value as a bool
    fileInfoGetAttributeInt64 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO Int64
    fileInfoGetAttributeInt64 info
    info string
    attribute =
      (CLong -> Int64) -> IO CLong -> IO Int64
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CLong -> Int64
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (IO CLong -> IO Int64) -> IO CLong -> IO Int64
    forall a b. (a -> b) -> a -> b
    $
      string -> (CString -> IO CLong) -> IO CLong
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CLong) -> IO CLong)
    -> (CString -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr -> do
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CLong) -> IO CLong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CLong) -> IO CLong)
    -> (Ptr FileInfo -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO CLong
    g_file_info_get_attribute_int64 Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr

    -- | Gets the value of a GObject attribute.
    fileInfoGetAttributeObject :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> IO (Maybe GObject) -- ^ returns the contents of the attribute value as a object
    fileInfoGetAttributeObject :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO (Maybe GObject)
    fileInfoGetAttributeObject info
    info string
    attribute =
      string -> (CString -> IO (Maybe GObject)) -> IO (Maybe GObject)
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO (Maybe GObject)) -> IO (Maybe GObject))
    -> (CString -> IO (Maybe GObject)) -> IO (Maybe GObject)
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
        (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO (Ptr ())) -> IO (Ptr ()))
    -> (Ptr FileInfo -> IO (Ptr ())) -> IO (Ptr ())
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO (Ptr ())
    g_file_info_get_attribute_object Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr
        IO (Ptr ()) -> (Ptr () -> IO (Maybe GObject)) -> IO (Maybe GObject)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= \Ptr ()
    x -> (IO (Ptr GObject) -> IO GObject)
    -> IO (Ptr GObject) -> IO (Maybe GObject)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr GObject -> GObject, FinalizerPtr GObject)
    -> IO (Ptr GObject) -> IO GObject
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr GObject -> GObject, FinalizerPtr GObject)
    forall {a}. (ForeignPtr GObject -> GObject, FinalizerPtr a)
    mkGObject) (Ptr GObject -> IO (Ptr GObject)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return (Ptr GObject -> IO (Ptr GObject))
    -> Ptr GObject -> IO (Ptr GObject)
    forall a b. (a -> b) -> a -> b
    $ Ptr () -> Ptr GObject
    forall a b. Ptr a -> Ptr b
    castPtr Ptr ()
    x)

    -- | Sets the attribute status for an attribute key. This is only needed by external code that implement
    -- 'fileSetAttributesFromInfo' or similar functions.
    --
    -- The attribute must exist in info for this to work. Otherwise 'False' is returned and info is
    -- unchanged.
    fileInfoSetAttributeStatus :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key
     -> FileAttributeStatus -- ^ @status@ a 'FileAttributeStatus'
     -> IO Bool -- ^ returns 'True' if the status was changed, 'False' if the key was not set.
    fileInfoSetAttributeStatus :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> FileAttributeStatus -> IO Bool
    fileInfoSetAttributeStatus info
    info string
    attribute FileAttributeStatus
    status =
       (CInt -> Bool) -> IO CInt -> IO Bool
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
    forall a b. (a -> b) -> a -> b
    $
       string -> (CString -> IO CInt) -> IO CInt
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO CInt) -> IO CInt)
    -> (CString -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
       (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CInt
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CInt -> IO CInt
    g_file_info_set_attribute_status Ptr FileInfo
    argPtr1 CString
    arg2 CInt
    arg3)
    {-# LINE 334 "./System/GIO/File/FileInfo.chs" #-}
         (toFileInfo info)
         CString
    attributePtr
         ((Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt)
    -> (FileAttributeStatus -> Int) -> FileAttributeStatus -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . FileAttributeStatus -> Int
    forall a. Enum a => a -> Int
    fromEnum) FileAttributeStatus
    status)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeString :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> string -- ^ @attrValue@ a string.
     -> IO ()
    fileInfoSetAttributeString :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> string -> IO ()
    fileInfoSetAttributeString info
    info string
    attribute string
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attrValue ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attrValuePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CString
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CString -> IO ()
    g_file_info_set_attribute_string Ptr FileInfo
    argPtr1 CString
    arg2 CString
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr CString
    attrValuePtr

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeStringList :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> [string] -- ^ @attrValue@ a string.
     -> IO ()
    fileInfoSetAttributeStringList :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> [string] -> IO ()
    fileInfoSetAttributeStringList info
    info string
    attribute [string]
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      [string] -> (Ptr CString -> IO ()) -> IO ()
    forall s a. GlibString s => [s] -> (Ptr CString -> IO a) -> IO a
    withUTFStringArray0 [string]
    attrValue ((Ptr CString -> IO ()) -> IO ())
    -> (Ptr CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ Ptr CString
    attrValuePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 Ptr CString
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> Ptr CString -> IO ()
    g_file_info_set_attribute_stringv Ptr FileInfo
    argPtr1 CString
    arg2 Ptr CString
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr Ptr CString
    attrValuePtr

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeByteString :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> ByteString -- ^ @attrValue@ a string.
     -> IO ()
    fileInfoSetAttributeByteString :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> ByteString -> IO ()
    fileInfoSetAttributeByteString info
    info string
    attribute ByteString
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      ByteString -> (CString -> IO ()) -> IO ()
    forall a. ByteString -> (CString -> IO a) -> IO a
    useAsCString ByteString
    attrValue ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attrValuePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CString
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CString -> IO ()
    g_file_info_set_attribute_byte_string Ptr FileInfo
    argPtr1 CString
    arg2 CString
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr CString
    attrValuePtr

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeBool :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Bool -- ^ @attrValue@ a string.
     -> IO ()
    fileInfoSetAttributeBool :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Bool -> IO ()
    fileInfoSetAttributeBool info
    info string
    attribute Bool
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CInt
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CInt -> IO ()
    g_file_info_set_attribute_boolean Ptr FileInfo
    argPtr1 CString
    arg2 CInt
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    attrValue)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeWord32 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Word32 -- ^ @attrValue@ an Word32
     -> IO ()
    fileInfoSetAttributeWord32 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Word32 -> IO ()
    fileInfoSetAttributeWord32 info
    info string
    attribute Word32
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CUInt
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CUInt -> IO ()
    g_file_info_set_attribute_uint32 Ptr FileInfo
    argPtr1 CString
    arg2 CUInt
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Word32 -> CUInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Word32
    attrValue)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeInt32 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Int32 -- ^ @attrValue@ an Int32
     -> IO ()
    fileInfoSetAttributeInt32 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Int32 -> IO ()
    fileInfoSetAttributeInt32 info
    info string
    attribute Int32
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CInt
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CInt -> IO ()
    g_file_info_set_attribute_int32 Ptr FileInfo
    argPtr1 CString
    arg2 CInt
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Int32 -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int32
    attrValue)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeWord64 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Word64 -- ^ @attrValue@ an Word64
     -> IO ()
    fileInfoSetAttributeWord64 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Word64 -> IO ()
    fileInfoSetAttributeWord64 info
    info string
    attribute Word64
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CULong
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CULong -> IO ()
    g_file_info_set_attribute_uint64 Ptr FileInfo
    argPtr1 CString
    arg2 CULong
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Word64 -> CULong
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Word64
    attrValue)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeInt64 :: (FileInfoClass info, GlibString string) => info
     -> string -- ^ @attribute@ a file attribute key.
     -> Int64 -- ^ @attrValue@ an Int64
     -> IO ()
    fileInfoSetAttributeInt64 :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> Int64 -> IO ()
    fileInfoSetAttributeInt64 info
    info string
    attribute Int64
    attrValue =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 CLong
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> CLong -> IO ()
    g_file_info_set_attribute_int64 Ptr FileInfo
    argPtr1 CString
    arg2 CLong
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Int64 -> CLong
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int64
    attrValue)

    -- | Sets the attribute to contain the given @attrValue@, if possible.
    fileInfoSetAttributeObject :: (FileInfoClass info, GlibString string) => info
     -> string
     -> GObject
     -> IO ()
    fileInfoSetAttributeObject :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> GObject -> IO ()
    fileInfoSetAttributeObject info
    info string
    attribute (GObject ForeignPtr GObject
    attrValue) =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    attributePtr ->
      ForeignPtr GObject -> (Ptr GObject -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr GObject
    attrValue ((Ptr GObject -> IO ()) -> IO ())
    -> (Ptr GObject -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr GObject
    attrValuePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 Ptr ()
    arg3 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> Ptr () -> IO ()
    g_file_info_set_attribute_object Ptr FileInfo
    argPtr1 CString
    arg2 Ptr ()
    arg3) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    attributePtr (Ptr GObject -> Ptr ()
    forall a b. Ptr a -> Ptr b
    castPtr Ptr GObject
    attrValuePtr)

    -- | Clears the status information from info.
    --
    fileInfoClearStatus :: FileInfoClass info => info -> IO ()
    fileInfoClearStatus :: forall info. FileInfoClass info => info -> IO ()
    fileInfoClearStatus info
    info =
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO ()
    g_file_info_clear_status Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's
    -- content type, see 'fileInfoGetContentType'.
    --
    fileInfoGetFileType :: FileInfoClass info => info
                        -> FileType -- ^ returns a 'FileType' for the given file.
    fileInfoGetFileType :: forall info. FileInfoClass info => info -> FileType
    fileInfoGetFileType info
    info =
        (Int -> FileType
    forall a. Enum a => Int -> a
    toEnum (Int -> FileType) -> (CInt -> Int) -> CInt -> FileType
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral) (CInt -> FileType) -> CInt -> FileType
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
            (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CInt
    g_file_info_get_file_type Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Checks if a file is hidden.
    fileInfoGetIsHidden :: FileInfoClass info => info
                        -> Bool -- ^ returns 'True' if the file is a hidden file, 'False' otherwise.
    fileInfoGetIsHidden :: forall info. FileInfoClass info => info -> Bool
    fileInfoGetIsHidden info
    info =
        CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (CInt -> Bool) -> CInt -> Bool
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
              (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CInt
    g_file_info_get_is_hidden Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Checks if a file is a backup file.
    fileInfoGetIsBackup :: FileInfoClass info => info
                        -> Bool -- ^ returns 'True' if the file is a backup file, 'False' otherwise.
    fileInfoGetIsBackup :: forall info. FileInfoClass info => info -> Bool
    fileInfoGetIsBackup info
    info =
        CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (CInt -> Bool) -> CInt -> Bool
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
              (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CInt
    g_file_info_get_is_backup Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Checks if a file is a symlink file.
    fileInfoGetIsSymlink :: FileInfoClass info => info
                        -> Bool -- ^ returns 'True' if the file is a symlink file, 'False' otherwise.
    fileInfoGetIsSymlink :: forall info. FileInfoClass info => info -> Bool
    fileInfoGetIsSymlink info
    info =
        CInt -> Bool
    forall a. (Eq a, Num a) => a -> Bool
    toBool (CInt -> Bool) -> CInt -> Bool
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
              (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CInt
    g_file_info_get_is_symlink Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Gets the name for a file.
    fileInfoGetName :: FileInfoClass info => info
                    -> Maybe ByteString -- ^ returns a string containing the file name.
    fileInfoGetName :: forall info. FileInfoClass info => info -> Maybe ByteString
    fileInfoGetName info
    info =
        IO (Maybe ByteString) -> Maybe ByteString
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe ByteString) -> Maybe ByteString)
    -> IO (Maybe ByteString) -> Maybe ByteString
    forall a b. (a -> b) -> a -> b
    $ do
        CString
    sPtr <- (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_name Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
        if CString
    sPtr CString -> CString -> Bool
    forall a. Eq a => a -> a -> Bool
    == CString
    forall a. Ptr a
    nullPtr
           then Maybe ByteString -> IO (Maybe ByteString)
    forall a. a -> IO a
    forall (m :: * -> *) a. Monad m => a -> m a
    return Maybe ByteString
    forall a. Maybe a
    Nothing
           else do
             Int
    sLen <- CChar -> CString -> IO Int
    forall a. (Storable a, Eq a) => a -> Ptr a -> IO Int
    lengthArray0 CChar
    0 CString
    sPtr
             (ByteString -> Maybe ByteString)
    -> IO ByteString -> IO (Maybe ByteString)
    forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
    liftM ByteString -> Maybe ByteString
    forall a. a -> Maybe a
    Just (IO ByteString -> IO (Maybe ByteString))
    -> IO ByteString -> IO (Maybe ByteString)
    forall a b. (a -> b) -> a -> b
    $ Ptr Word8 -> Int -> IO () -> IO ByteString
    unsafePackCStringFinalizer (CString -> Ptr Word8
    forall a b. Ptr a -> Ptr b
    castPtr CString
    sPtr) (Int -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    sLen)
                              (Ptr () -> IO ()
    g_free (CString -> Ptr ()
    forall a b. Ptr a -> Ptr b
    castPtr CString
    sPtr))

    -- | Gets the display name for a file.
    fileInfoGetDisplayName :: (FileInfoClass info, GlibString string) => info
                    -> Maybe string -- ^ returns a string containing the display name.
    fileInfoGetDisplayName :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> Maybe string
    fileInfoGetDisplayName info
    info =
        IO (Maybe string) -> Maybe string
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe string) -> Maybe string)
    -> IO (Maybe string) -> Maybe string
    forall a b. (a -> b) -> a -> b
    $
        (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_display_name Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
        IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO string) -> CString -> IO (Maybe string)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the edit name for a file.
    fileInfoGetEditName :: (FileInfoClass info, GlibString string) => info
                    -> Maybe string -- ^ returns a string containing the edit name.
    fileInfoGetEditName :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> Maybe string
    fileInfoGetEditName info
    info =
        IO (Maybe string) -> Maybe string
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe string) -> Maybe string)
    -> IO (Maybe string) -> Maybe string
    forall a b. (a -> b) -> a -> b
    $
        (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_edit_name Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
        IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO string) -> CString -> IO (Maybe string)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the icon for a file.
    fileInfoGetIcon :: FileInfoClass info => info
                    -> IO Icon -- ^ returns 'Icon' for the given info.
    fileInfoGetIcon :: forall info. FileInfoClass info => info -> IO Icon
    fileInfoGetIcon info
    info =
        (ForeignPtr Icon -> Icon, FinalizerPtr Icon)
    -> IO (Ptr Icon) -> IO Icon
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr Icon -> Icon, FinalizerPtr Icon)
    forall {a}. (ForeignPtr Icon -> Icon, FinalizerPtr a)
    mkIcon (IO (Ptr Icon) -> IO Icon) -> IO (Ptr Icon) -> IO Icon
    forall a b. (a -> b) -> a -> b
    $
        (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo
    -> (Ptr FileInfo -> IO (Ptr Icon)) -> IO (Ptr Icon)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO (Ptr Icon)) -> IO (Ptr Icon))
    -> (Ptr FileInfo -> IO (Ptr Icon)) -> IO (Ptr Icon)
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO (Ptr Icon)
    g_file_info_get_icon Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Gets the file's content type.
    fileInfoGetContentType :: (FileInfoClass info, GlibString string) => info
                           -> Maybe string -- ^ returns a string containing the file's content type.
    fileInfoGetContentType :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> Maybe string
    fileInfoGetContentType info
    info =
      IO (Maybe string) -> Maybe string
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe string) -> Maybe string)
    -> IO (Maybe string) -> Maybe string
    forall a b. (a -> b) -> a -> b
    $
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_content_type Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
      IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO string) -> CString -> IO (Maybe string)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO string
    forall s. GlibString s => CString -> IO s
    peekUTFString

    -- | Gets the modification time of the current info and sets it in result.
    fileInfoGetModificationTime :: FileInfoClass info => info
     -> GTimeVal
    fileInfoGetModificationTime :: forall info. FileInfoClass info => info -> GTimeVal
    fileInfoGetModificationTime info
    info =
      IO GTimeVal -> GTimeVal
    forall a. IO a -> a
    unsafePerformIO (IO GTimeVal -> GTimeVal) -> IO GTimeVal -> GTimeVal
    forall a b. (a -> b) -> a -> b
    $
      (Ptr GTimeVal -> IO GTimeVal) -> IO GTimeVal
    forall a b. Storable a => (Ptr a -> IO b) -> IO b
    alloca ((Ptr GTimeVal -> IO GTimeVal) -> IO GTimeVal)
    -> (Ptr GTimeVal -> IO GTimeVal) -> IO GTimeVal
    forall a b. (a -> b) -> a -> b
    $ \ Ptr GTimeVal
    timeValPtr -> do
         (\(FileInfo ForeignPtr FileInfo
    arg1) Ptr ()
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> Ptr () -> IO ()
    g_file_info_get_modification_time Ptr FileInfo
    argPtr1 Ptr ()
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Ptr GTimeVal -> Ptr ()
    forall a b. Ptr a -> Ptr b
    castPtr Ptr GTimeVal
    timeValPtr)
         Ptr GTimeVal -> IO GTimeVal
    forall a. Storable a => Ptr a -> IO a
    peek Ptr GTimeVal
    timeValPtr

    -- | Gets the file's size.
    fileInfoGetSize :: FileInfoClass info => info
                    -> Int64 -- ^ returns a 'Offset' containing the file's size.
    fileInfoGetSize :: forall info. FileInfoClass info => info -> Int64
    fileInfoGetSize info
    info =
      CLong -> Int64
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (CLong -> Int64) -> CLong -> Int64
    forall a b. (a -> b) -> a -> b
    $ IO CLong -> CLong
    forall a. IO a -> a
    unsafePerformIO (IO CLong -> CLong) -> IO CLong -> CLong
    forall a b. (a -> b) -> a -> b
    $
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CLong) -> IO CLong
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CLong) -> IO CLong)
    -> (Ptr FileInfo -> IO CLong) -> IO CLong
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CLong
    g_file_info_get_size Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Gets the symlink target for a given 'FileInfo'.
    fileInfoGetSymlinkTarget :: (FileInfoClass info, GlibString string) => info
                             -> Maybe string -- ^ returns a string containing the symlink target.
    fileInfoGetSymlinkTarget :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> Maybe string
    fileInfoGetSymlinkTarget info
    info =
      IO (Maybe string) -> Maybe string
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe string) -> Maybe string)
    -> IO (Maybe string) -> Maybe string
    forall a b. (a -> b) -> a -> b
    $
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_symlink_target Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
      IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO string) -> CString -> IO (Maybe string)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the entity tag for a given 'FileInfo'. See 'FileAttributeEtagValue'.
    fileInfoGetEtag :: (FileInfoClass info, GlibString string) => info
                    -> Maybe string -- ^ returns a string containing the value of the "etag:value" attribute.
    fileInfoGetEtag :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> Maybe string
    fileInfoGetEtag info
    info =
      IO (Maybe string) -> Maybe string
    forall a. IO a -> a
    unsafePerformIO (IO (Maybe string) -> Maybe string)
    -> IO (Maybe string) -> Maybe string
    forall a b. (a -> b) -> a -> b
    $
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CString) -> IO CString)
    -> (Ptr FileInfo -> IO CString) -> IO CString
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CString
    g_file_info_get_etag Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)
      IO CString -> (CString -> IO (Maybe string)) -> IO (Maybe string)
    forall a b. IO a -> (a -> IO b) -> IO b
    forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
    >>= (CString -> IO string) -> CString -> IO (Maybe string)
    forall a b. (Ptr a -> IO b) -> Ptr a -> IO (Maybe b)
    maybePeek CString -> IO string
    forall s. GlibString s => CString -> IO s
    readUTFString

    -- | Gets the value of the @sortOrder@ attribute from the 'FileInfo'. See
    -- 'FileAttributeStandardSortOrder'.
    fileInfoGetSortOrder :: FileInfoClass info => info
                         -> Int -- ^ returns the value of the \"standard::sort_order\" attribute.
    fileInfoGetSortOrder :: forall info. FileInfoClass info => info -> Int
    fileInfoGetSortOrder info
    info =
      CInt -> Int
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (CInt -> Int) -> CInt -> Int
    forall a b. (a -> b) -> a -> b
    $ IO CInt -> CInt
    forall a. IO a -> a
    unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
    forall a b. (a -> b) -> a -> b
    $
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO CInt) -> IO CInt)
    -> (Ptr FileInfo -> IO CInt) -> IO CInt
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO CInt
    g_file_info_get_sort_order Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Unsets a mask set by 'fileInfoSetAttributeMask', if one is set.
    fileInfoUnsetAttributeMask :: FileInfoClass info => info -> IO ()
    fileInfoUnsetAttributeMask :: forall info. FileInfoClass info => info -> IO ()
    fileInfoUnsetAttributeMask info
    info =
      (\(FileInfo ForeignPtr FileInfo
    arg1) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> IO ()
    g_file_info_unset_attribute_mask Ptr FileInfo
    argPtr1) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info)

    -- | Sets the file type in a 'FileInfo' to type. See 'FileAttributeStandardType'.
    fileInfoSetFileType :: FileInfoClass info => info -> FileType -> IO ()
    fileInfoSetFileType :: forall info. FileInfoClass info => info -> FileType -> IO ()
    fileInfoSetFileType info
    info FileType
    fType =
      (\(FileInfo ForeignPtr FileInfo
    arg1) CInt
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CInt -> IO ()
    g_file_info_set_file_type Ptr FileInfo
    argPtr1 CInt
    arg2)
    {-# LINE 555 "./System/GIO/File/FileInfo.chs" #-}
      (toFileInfo info)
      ((Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral (Int -> CInt) -> (FileType -> Int) -> FileType -> CInt
    forall b c a. (b -> c) -> (a -> b) -> a -> c
    . FileType -> Int
    forall a. Enum a => a -> Int
    fromEnum) FileType
    fType)

    -- | Sets the @isHidden@ attribute in a 'FileInfo' according to @isSymlink@. See
    -- 'FileAttributeStandardIsHidden'.
    fileInfoSetIsHidden :: FileInfoClass info => info -> Bool -> IO ()
    fileInfoSetIsHidden :: forall info. FileInfoClass info => info -> Bool -> IO ()
    fileInfoSetIsHidden info
    info Bool
    isHidden =
      (\(FileInfo ForeignPtr FileInfo
    arg1) CInt
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CInt -> IO ()
    g_file_info_set_is_hidden Ptr FileInfo
    argPtr1 CInt
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    isHidden)

    -- | Sets the @isSymlink@ attribute in a 'FileInfo' according to @isSymlink@. See
    -- 'FileAttributeStandardIsSymlink'.
    fileInfoSetIsSymlink :: FileInfoClass info => info -> Bool -> IO ()
    fileInfoSetIsSymlink :: forall info. FileInfoClass info => info -> Bool -> IO ()
    fileInfoSetIsSymlink info
    info Bool
    isSymlink =
      (\(FileInfo ForeignPtr FileInfo
    arg1) CInt
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CInt -> IO ()
    g_file_info_set_is_symlink Ptr FileInfo
    argPtr1 CInt
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Bool -> CInt
    forall a. Num a => Bool -> a
    fromBool Bool
    isSymlink)

    -- | Sets the name attribute for the current 'FileInfo'. See 'FileAttributeStandardName'.
    fileInfoSetName :: FileInfoClass info => info -> ByteString -> IO ()
    fileInfoSetName :: forall info. FileInfoClass info => info -> ByteString -> IO ()
    fileInfoSetName info
    info ByteString
    name =
      ByteString -> (CString -> IO ()) -> IO ()
    forall a. ByteString -> (CString -> IO a) -> IO a
    useAsCString ByteString
    name ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    namePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO ()
    g_file_info_set_name Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    namePtr

    -- | Sets the display name for the current 'FileInfo'. See 'FileAttributeStandardDisplayName'.
    fileInfoSetDisplayName :: (FileInfoClass info, GlibString string) => info -> string -> IO ()
    fileInfoSetDisplayName :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO ()
    fileInfoSetDisplayName info
    info string
    displayName =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    displayName ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    displayNamePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO ()
    g_file_info_set_display_name Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    displayNamePtr

    -- | Sets the edit name for the current 'FileInfo'. See 'FileAttributeStandardEditName'.
    fileInfoSetEditName :: (FileInfoClass info, GlibString string) => info -> string -> IO ()
    fileInfoSetEditName :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO ()
    fileInfoSetEditName info
    info string
    editName =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    editName ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    editNamePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO ()
    g_file_info_set_edit_name Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    editNamePtr

    -- | Sets the icon for a given 'FileInfo'. See 'FileAttributeStandardIcon'.
    fileInfoSetIcon :: FileInfoClass info => info -> Icon -> IO ()
    fileInfoSetIcon :: forall info. FileInfoClass info => info -> Icon -> IO ()
    fileInfoSetIcon info
    info Icon
    icon =
        (\(FileInfo ForeignPtr FileInfo
    arg1) (Icon ForeignPtr Icon
    arg2) -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->ForeignPtr Icon -> (Ptr Icon -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Icon
    arg2 ((Ptr Icon -> IO ()) -> IO ()) -> (Ptr Icon -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Icon
    argPtr2 ->Ptr FileInfo -> Ptr Icon -> IO ()
    g_file_info_set_icon Ptr FileInfo
    argPtr1 Ptr Icon
    argPtr2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Icon -> Icon
    forall o. IconClass o => o -> Icon
    toIcon Icon
    icon)

    -- | Sets the content type attribute for a given 'FileInfo'. See 'FileAttributeStandardContentType'.
    fileInfoSetContentType :: (FileInfoClass info, GlibString string) => info
                           -> string -- ^ @contentType@ a content type. See GContentType.
                           -> IO ()
    fileInfoSetContentType :: forall info string.
    (FileInfoClass info, GlibString string) =>
    info -> string -> IO ()
    fileInfoSetContentType info
    info string
    contentType =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    contentType ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ CString
    contentTypePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) CString
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CString -> IO ()
    g_file_info_set_content_type Ptr FileInfo
    argPtr1 CString
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) CString
    contentTypePtr

    -- | Sets the 'FileAttributeTimeModified' attribute in the file info to the given time value.
    fileInfoSetModificationTime :: FileInfoClass info => info
     -> GTimeVal
     -> IO ()
    fileInfoSetModificationTime :: forall info. FileInfoClass info => info -> GTimeVal -> IO ()
    fileInfoSetModificationTime info
    info GTimeVal
    mtime =
      GTimeVal -> (Ptr GTimeVal -> IO ()) -> IO ()
    forall a b. Storable a => a -> (Ptr a -> IO b) -> IO b
    with GTimeVal
    mtime ((Ptr GTimeVal -> IO ()) -> IO ())
    -> (Ptr GTimeVal -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \ Ptr GTimeVal
    mtimePtr ->
      (\(FileInfo ForeignPtr FileInfo
    arg1) Ptr ()
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> Ptr () -> IO ()
    g_file_info_set_modification_time Ptr FileInfo
    argPtr1 Ptr ()
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Ptr GTimeVal -> Ptr ()
    forall a b. Ptr a -> Ptr b
    castPtr Ptr GTimeVal
    mtimePtr)

    -- | Sets the 'FileAttributeStandardSize' attribute in the file info to the given size.
    fileInfoSetSize :: FileInfoClass info => info
                    -> Int64 -- ^ @size@ a goffset containing the file's size.
                    -> IO ()
    fileInfoSetSize :: forall info. FileInfoClass info => info -> Int64 -> IO ()
    fileInfoSetSize info
    info Int64
    size =
      (\(FileInfo ForeignPtr FileInfo
    arg1) CLong
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CLong -> IO ()
    g_file_info_set_size Ptr FileInfo
    argPtr1 CLong
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Int64 -> CLong
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int64
    size)

    -- | Sets the 'FileAttributeStandardSymlinkTarget' attribute in the file info to the given symlink
    -- target.
    -- fileInfoSetSymlinkTarget :: FileInfoClass info => info
    -- -> String -- ^ @symlinkTarget@ a static string containing a path to a symlink target.
    -- -> IO ()
    -- fileInfoSetSymlinkTarget info symlinkTarget =
    -- withUTFString symlinkTarget $ \ symlinkTargetPtr ->
    -- {#call g_file_info_set_symlink_target#} (toFileInfo info) symlinkTargetPtr

    -- | Sets the sort order attribute in the file info structure. See 'FileAttributeStandardSortOrder'.
    fileInfoSetSortOrder :: FileInfoClass info => info
                         -> Int -- ^ @sortOrder@ a sort order integer.
                         -> IO ()
    fileInfoSetSortOrder :: forall info. FileInfoClass info => info -> Int -> IO ()
    fileInfoSetSortOrder info
    info Int
    sortOrder =
      (\(FileInfo ForeignPtr FileInfo
    arg1) CInt
    arg2 -> ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr FileInfo
    arg1 ((Ptr FileInfo -> IO ()) -> IO ())
    -> (Ptr FileInfo -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr FileInfo
    argPtr1 ->Ptr FileInfo -> CInt -> IO ()
    g_file_info_set_sort_order Ptr FileInfo
    argPtr1 CInt
    arg2) (info -> FileInfo
    forall o. FileInfoClass o => o -> FileInfo
    toFileInfo info
    info) (Int -> CInt
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    sortOrder)

    foreign import ccall safe "g_file_info_new"
      g_file_info_new :: (IO (Ptr FileInfo))

    foreign import ccall safe "g_file_info_dup"
      g_file_info_dup :: ((Ptr FileInfo) -> (IO (Ptr FileInfo)))

    foreign import ccall safe "g_file_info_copy_into"
      g_file_info_copy_into :: ((Ptr FileInfo) -> ((Ptr FileInfo) -> (IO ())))

    foreign import ccall safe "g_file_info_has_attribute"
      g_file_info_has_attribute :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_has_namespace"
      g_file_info_has_namespace :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_list_attributes"
      g_file_info_list_attributes :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr (Ptr CChar)))))

    foreign import ccall safe "g_file_info_get_attribute_type"
      g_file_info_get_attribute_type :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_remove_attribute"
      g_file_info_remove_attribute :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "g_file_info_get_attribute_as_string"
      g_file_info_get_attribute_as_string :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr CChar))))

    foreign import ccall safe "g_file_info_get_attribute_status"
      g_file_info_get_attribute_status :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_get_attribute_string"
      g_file_info_get_attribute_string :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr CChar))))

    foreign import ccall safe "g_file_info_get_attribute_stringv"
      g_file_info_get_attribute_stringv :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr (Ptr CChar)))))

    foreign import ccall safe "g_file_info_get_attribute_byte_string"
      g_file_info_get_attribute_byte_string :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr CChar))))

    foreign import ccall unsafe "g_free"
      g_free :: ((Ptr ()) -> (IO ()))

    foreign import ccall safe "g_file_info_get_attribute_boolean"
      g_file_info_get_attribute_boolean :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_get_attribute_uint32"
      g_file_info_get_attribute_uint32 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CUInt)))

    foreign import ccall safe "g_file_info_get_attribute_int32"
      g_file_info_get_attribute_int32 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CInt)))

    foreign import ccall safe "g_file_info_get_attribute_uint64"
      g_file_info_get_attribute_uint64 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CULong)))

    foreign import ccall safe "g_file_info_get_attribute_int64"
      g_file_info_get_attribute_int64 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO CLong)))

    foreign import ccall safe "g_file_info_get_attribute_object"
      g_file_info_get_attribute_object :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO (Ptr ()))))

    foreign import ccall safe "g_file_info_set_attribute_status"
      g_file_info_set_attribute_status :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CInt -> (IO CInt))))

    foreign import ccall safe "g_file_info_set_attribute_string"
      g_file_info_set_attribute_string :: ((Ptr FileInfo) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_stringv"
      g_file_info_set_attribute_stringv :: ((Ptr FileInfo) -> ((Ptr CChar) -> ((Ptr (Ptr CChar)) -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_byte_string"
      g_file_info_set_attribute_byte_string :: ((Ptr FileInfo) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_boolean"
      g_file_info_set_attribute_boolean :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CInt -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_uint32"
      g_file_info_set_attribute_uint32 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CUInt -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_int32"
      g_file_info_set_attribute_int32 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CInt -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_uint64"
      g_file_info_set_attribute_uint64 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CULong -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_int64"
      g_file_info_set_attribute_int64 :: ((Ptr FileInfo) -> ((Ptr CChar) -> (CLong -> (IO ()))))

    foreign import ccall safe "g_file_info_set_attribute_object"
      g_file_info_set_attribute_object :: ((Ptr FileInfo) -> ((Ptr CChar) -> ((Ptr ()) -> (IO ()))))

    foreign import ccall safe "g_file_info_clear_status"
      g_file_info_clear_status :: ((Ptr FileInfo) -> (IO ()))

    foreign import ccall safe "g_file_info_get_file_type"
      g_file_info_get_file_type :: ((Ptr FileInfo) -> (IO CInt))

    foreign import ccall safe "g_file_info_get_is_hidden"
      g_file_info_get_is_hidden :: ((Ptr FileInfo) -> (IO CInt))

    foreign import ccall safe "g_file_info_get_is_backup"
      g_file_info_get_is_backup :: ((Ptr FileInfo) -> (IO CInt))

    foreign import ccall safe "g_file_info_get_is_symlink"
      g_file_info_get_is_symlink :: ((Ptr FileInfo) -> (IO CInt))

    foreign import ccall safe "g_file_info_get_name"
      g_file_info_get_name :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_display_name"
      g_file_info_get_display_name :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_edit_name"
      g_file_info_get_edit_name :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_icon"
      g_file_info_get_icon :: ((Ptr FileInfo) -> (IO (Ptr Icon)))

    foreign import ccall safe "g_file_info_get_content_type"
      g_file_info_get_content_type :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_modification_time"
      g_file_info_get_modification_time :: ((Ptr FileInfo) -> ((Ptr ()) -> (IO ())))

    foreign import ccall safe "g_file_info_get_size"
      g_file_info_get_size :: ((Ptr FileInfo) -> (IO CLong))

    foreign import ccall safe "g_file_info_get_symlink_target"
      g_file_info_get_symlink_target :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_etag"
      g_file_info_get_etag :: ((Ptr FileInfo) -> (IO (Ptr CChar)))

    foreign import ccall safe "g_file_info_get_sort_order"
      g_file_info_get_sort_order :: ((Ptr FileInfo) -> (IO CInt))

    foreign import ccall safe "g_file_info_unset_attribute_mask"
      g_file_info_unset_attribute_mask :: ((Ptr FileInfo) -> (IO ()))

    foreign import ccall safe "g_file_info_set_file_type"
      g_file_info_set_file_type :: ((Ptr FileInfo) -> (CInt -> (IO ())))

    foreign import ccall safe "g_file_info_set_is_hidden"
      g_file_info_set_is_hidden :: ((Ptr FileInfo) -> (CInt -> (IO ())))

    foreign import ccall safe "g_file_info_set_is_symlink"
      g_file_info_set_is_symlink :: ((Ptr FileInfo) -> (CInt -> (IO ())))

    foreign import ccall safe "g_file_info_set_name"
      g_file_info_set_name :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "g_file_info_set_display_name"
      g_file_info_set_display_name :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "g_file_info_set_edit_name"
      g_file_info_set_edit_name :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "g_file_info_set_icon"
      g_file_info_set_icon :: ((Ptr FileInfo) -> ((Ptr Icon) -> (IO ())))

    foreign import ccall safe "g_file_info_set_content_type"
      g_file_info_set_content_type :: ((Ptr FileInfo) -> ((Ptr CChar) -> (IO ())))

    foreign import ccall safe "g_file_info_set_modification_time"
      g_file_info_set_modification_time :: ((Ptr FileInfo) -> ((Ptr ()) -> (IO ())))

    foreign import ccall safe "g_file_info_set_size"
      g_file_info_set_size :: ((Ptr FileInfo) -> (CLong -> (IO ())))

    foreign import ccall safe "g_file_info_set_sort_order"
      g_file_info_set_sort_order :: ((Ptr FileInfo) -> (CInt -> (IO ())))