{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

Information about a specific attribute.
-}

#define ENABLE_OVERLOADING \
       (!defined(__HADDOCK_VERSION__))

module GI.Gio.Structs.FileAttributeInfo
    ( 

-- * Exported types
    FileAttributeInfo(..)                   ,
    newZeroFileAttributeInfo                ,
    noFileAttributeInfo                     ,


 -- * Properties
-- ** flags #attr:flags#
{- | a set of 'GI.Gio.Flags.FileAttributeInfoFlags'.
-}
#if ENABLE_OVERLOADING
    fileAttributeInfo_flags                 ,
#endif
    getFileAttributeInfoFlags               ,
    setFileAttributeInfoFlags               ,


-- ** name #attr:name#
{- | the name of the attribute.
-}
    clearFileAttributeInfoName              ,
#if ENABLE_OVERLOADING
    fileAttributeInfo_name                  ,
#endif
    getFileAttributeInfoName                ,
    setFileAttributeInfoName                ,


-- ** type #attr:type#
{- | the 'GI.Gio.Enums.FileAttributeType' type of the attribute.
-}
#if ENABLE_OVERLOADING
    fileAttributeInfo_type                  ,
#endif
    getFileAttributeInfoType                ,
    setFileAttributeInfoType                ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags

-- | Memory-managed wrapper type.
newtype FileAttributeInfo = FileAttributeInfo (ManagedPtr FileAttributeInfo)
instance WrappedPtr FileAttributeInfo where
    wrappedPtrCalloc :: IO (Ptr FileAttributeInfo)
wrappedPtrCalloc = Int -> IO (Ptr FileAttributeInfo)
forall a. Int -> IO (Ptr a)
callocBytes 16
    wrappedPtrCopy :: FileAttributeInfo -> IO FileAttributeInfo
wrappedPtrCopy = \p :: FileAttributeInfo
p -> FileAttributeInfo
-> (Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> IO FileAttributeInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
p (Int -> Ptr FileAttributeInfo -> IO (Ptr FileAttributeInfo)
forall a. WrappedPtr a => Int -> Ptr a -> IO (Ptr a)
copyBytes 16 (Ptr FileAttributeInfo -> IO (Ptr FileAttributeInfo))
-> (Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> Ptr FileAttributeInfo
-> IO FileAttributeInfo
forall (m :: * -> *) a b c.
Monad m =>
(a -> m b) -> (b -> m c) -> a -> m c
>=> (ManagedPtr FileAttributeInfo -> FileAttributeInfo)
-> Ptr FileAttributeInfo -> IO FileAttributeInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr FileAttributeInfo -> FileAttributeInfo
FileAttributeInfo)
    wrappedPtrFree :: Maybe (FunPtr (Ptr FileAttributeInfo -> IO ()))
wrappedPtrFree = FunPtr (Ptr FileAttributeInfo -> IO ())
-> Maybe (FunPtr (Ptr FileAttributeInfo -> IO ()))
forall a. a -> Maybe a
Just FunPtr (Ptr FileAttributeInfo -> IO ())
forall a. FunPtr (Ptr a -> IO ())
ptr_to_g_free

-- | Construct a `FileAttributeInfo` struct initialized to zero.
newZeroFileAttributeInfo :: MonadIO m => m FileAttributeInfo
newZeroFileAttributeInfo :: m FileAttributeInfo
newZeroFileAttributeInfo = IO FileAttributeInfo -> m FileAttributeInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeInfo -> m FileAttributeInfo)
-> IO FileAttributeInfo -> m FileAttributeInfo
forall a b. (a -> b) -> a -> b
$ IO (Ptr FileAttributeInfo)
forall a. WrappedPtr a => IO (Ptr a)
wrappedPtrCalloc IO (Ptr FileAttributeInfo)
-> (Ptr FileAttributeInfo -> IO FileAttributeInfo)
-> IO FileAttributeInfo
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr FileAttributeInfo -> FileAttributeInfo)
-> Ptr FileAttributeInfo -> IO FileAttributeInfo
forall a.
(HasCallStack, WrappedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr FileAttributeInfo -> FileAttributeInfo
FileAttributeInfo

instance tag ~ 'AttrSet => Constructible FileAttributeInfo tag where
    new :: (ManagedPtr FileAttributeInfo -> FileAttributeInfo)
-> [AttrOp FileAttributeInfo tag] -> m FileAttributeInfo
new _ attrs :: [AttrOp FileAttributeInfo tag]
attrs = do
        FileAttributeInfo
o <- m FileAttributeInfo
forall (m :: * -> *). MonadIO m => m FileAttributeInfo
newZeroFileAttributeInfo
        FileAttributeInfo -> [AttrOp FileAttributeInfo 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set FileAttributeInfo
o [AttrOp FileAttributeInfo tag]
[AttrOp FileAttributeInfo 'AttrSet]
attrs
        FileAttributeInfo -> m FileAttributeInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeInfo
o


-- | A convenience alias for `Nothing` :: `Maybe` `FileAttributeInfo`.
noFileAttributeInfo :: Maybe FileAttributeInfo
noFileAttributeInfo :: Maybe FileAttributeInfo
noFileAttributeInfo = Maybe FileAttributeInfo
forall a. Maybe a
Nothing

{- |
Get the value of the “@name@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' fileAttributeInfo #name
@
-}
getFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m (Maybe T.Text)
getFileAttributeInfoName :: FileAttributeInfo -> m (Maybe Text)
getFileAttributeInfoName s :: FileAttributeInfo
s = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo
-> (Ptr FileAttributeInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO (Maybe Text)) -> IO (Maybe Text))
-> (Ptr FileAttributeInfo -> IO (Maybe Text)) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    CString
val <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) :: IO CString
    Maybe Text
result <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull CString
val ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \val' :: CString
val' -> do
        Text
val'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
val'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
val''
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
result

{- |
Set the value of the “@name@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' fileAttributeInfo [ #name 'Data.GI.Base.Attributes.:=' value ]
@
-}
setFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> CString -> m ()
setFileAttributeInfoName :: FileAttributeInfo -> CString -> m ()
setFileAttributeInfoName s :: FileAttributeInfo
s val :: CString
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo -> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO ()) -> IO ())
-> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CString
val :: CString)

{- |
Set the value of the “@name@” field to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.clear' #name
@
-}
clearFileAttributeInfoName :: MonadIO m => FileAttributeInfo -> m ()
clearFileAttributeInfoName :: FileAttributeInfo -> m ()
clearFileAttributeInfoName s :: FileAttributeInfo
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo -> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO ()) -> IO ())
-> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    Ptr CString -> CString -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CString
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 0) (CString
forall a. Ptr a
FP.nullPtr :: CString)

#if ENABLE_OVERLOADING
data FileAttributeInfoNameFieldInfo
instance AttrInfo FileAttributeInfoNameFieldInfo where
    type AttrAllowedOps FileAttributeInfoNameFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint FileAttributeInfoNameFieldInfo = (~) CString
    type AttrBaseTypeConstraint FileAttributeInfoNameFieldInfo = (~) FileAttributeInfo
    type AttrGetType FileAttributeInfoNameFieldInfo = Maybe T.Text
    type AttrLabel FileAttributeInfoNameFieldInfo = "name"
    type AttrOrigin FileAttributeInfoNameFieldInfo = FileAttributeInfo
    attrGet _ = getFileAttributeInfoName
    attrSet _ = setFileAttributeInfoName
    attrConstruct = undefined
    attrClear _ = clearFileAttributeInfoName

fileAttributeInfo_name :: AttrLabelProxy "name"
fileAttributeInfo_name = AttrLabelProxy

#endif


{- |
Get the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' fileAttributeInfo #type
@
-}
getFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> m Gio.Enums.FileAttributeType
getFileAttributeInfoType :: FileAttributeInfo -> m FileAttributeType
getFileAttributeInfoType s :: FileAttributeInfo
s = IO FileAttributeType -> m FileAttributeType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeType -> m FileAttributeType)
-> IO FileAttributeType -> m FileAttributeType
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo
-> (Ptr FileAttributeInfo -> IO FileAttributeType)
-> IO FileAttributeType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO FileAttributeType)
 -> IO FileAttributeType)
-> (Ptr FileAttributeInfo -> IO FileAttributeType)
-> IO FileAttributeType
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) :: IO CUInt
    let val' :: FileAttributeType
val' = (Int -> FileAttributeType
forall a. Enum a => Int -> a
toEnum (Int -> FileAttributeType)
-> (CUInt -> Int) -> CUInt -> FileAttributeType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
    FileAttributeType -> IO FileAttributeType
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeType
val'

{- |
Set the value of the “@type@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' fileAttributeInfo [ #type 'Data.GI.Base.Attributes.:=' value ]
@
-}
setFileAttributeInfoType :: MonadIO m => FileAttributeInfo -> Gio.Enums.FileAttributeType -> m ()
setFileAttributeInfoType :: FileAttributeInfo -> FileAttributeType -> m ()
setFileAttributeInfoType s :: FileAttributeInfo
s val :: FileAttributeType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo -> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO ()) -> IO ())
-> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FileAttributeType -> Int) -> FileAttributeType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileAttributeType -> Int
forall a. Enum a => a -> Int
fromEnum) FileAttributeType
val
    Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 8) (CUInt
val' :: CUInt)

#if ENABLE_OVERLOADING
data FileAttributeInfoTypeFieldInfo
instance AttrInfo FileAttributeInfoTypeFieldInfo where
    type AttrAllowedOps FileAttributeInfoTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint FileAttributeInfoTypeFieldInfo = (~) Gio.Enums.FileAttributeType
    type AttrBaseTypeConstraint FileAttributeInfoTypeFieldInfo = (~) FileAttributeInfo
    type AttrGetType FileAttributeInfoTypeFieldInfo = Gio.Enums.FileAttributeType
    type AttrLabel FileAttributeInfoTypeFieldInfo = "type"
    type AttrOrigin FileAttributeInfoTypeFieldInfo = FileAttributeInfo
    attrGet _ = getFileAttributeInfoType
    attrSet _ = setFileAttributeInfoType
    attrConstruct = undefined
    attrClear _ = undefined

fileAttributeInfo_type :: AttrLabelProxy "type"
fileAttributeInfo_type = AttrLabelProxy

#endif


{- |
Get the value of the “@flags@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' fileAttributeInfo #flags
@
-}
getFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> m [Gio.Flags.FileAttributeInfoFlags]
getFileAttributeInfoFlags :: FileAttributeInfo -> m [FileAttributeInfoFlags]
getFileAttributeInfoFlags s :: FileAttributeInfo
s = IO [FileAttributeInfoFlags] -> m [FileAttributeInfoFlags]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [FileAttributeInfoFlags] -> m [FileAttributeInfoFlags])
-> IO [FileAttributeInfoFlags] -> m [FileAttributeInfoFlags]
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo
-> (Ptr FileAttributeInfo -> IO [FileAttributeInfoFlags])
-> IO [FileAttributeInfoFlags]
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO [FileAttributeInfoFlags])
 -> IO [FileAttributeInfoFlags])
-> (Ptr FileAttributeInfo -> IO [FileAttributeInfoFlags])
-> IO [FileAttributeInfoFlags]
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12) :: IO CUInt
    let val' :: [FileAttributeInfoFlags]
val' = CUInt -> [FileAttributeInfoFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
val
    [FileAttributeInfoFlags] -> IO [FileAttributeInfoFlags]
forall (m :: * -> *) a. Monad m => a -> m a
return [FileAttributeInfoFlags]
val'

{- |
Set the value of the “@flags@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' fileAttributeInfo [ #flags 'Data.GI.Base.Attributes.:=' value ]
@
-}
setFileAttributeInfoFlags :: MonadIO m => FileAttributeInfo -> [Gio.Flags.FileAttributeInfoFlags] -> m ()
setFileAttributeInfoFlags :: FileAttributeInfo -> [FileAttributeInfoFlags] -> m ()
setFileAttributeInfoFlags s :: FileAttributeInfo
s val :: [FileAttributeInfoFlags]
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ FileAttributeInfo -> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr FileAttributeInfo
s ((Ptr FileAttributeInfo -> IO ()) -> IO ())
-> (Ptr FileAttributeInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ptr :: Ptr FileAttributeInfo
ptr -> do
    let val' :: CUInt
val' = [FileAttributeInfoFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [FileAttributeInfoFlags]
val
    Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr FileAttributeInfo
ptr Ptr FileAttributeInfo -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` 12) (CUInt
val' :: CUInt)

#if ENABLE_OVERLOADING
data FileAttributeInfoFlagsFieldInfo
instance AttrInfo FileAttributeInfoFlagsFieldInfo where
    type AttrAllowedOps FileAttributeInfoFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
    type AttrSetTypeConstraint FileAttributeInfoFlagsFieldInfo = (~) [Gio.Flags.FileAttributeInfoFlags]
    type AttrBaseTypeConstraint FileAttributeInfoFlagsFieldInfo = (~) FileAttributeInfo
    type AttrGetType FileAttributeInfoFlagsFieldInfo = [Gio.Flags.FileAttributeInfoFlags]
    type AttrLabel FileAttributeInfoFlagsFieldInfo = "flags"
    type AttrOrigin FileAttributeInfoFlagsFieldInfo = FileAttributeInfo
    attrGet _ = getFileAttributeInfoFlags
    attrSet _ = setFileAttributeInfoFlags
    attrConstruct = undefined
    attrClear _ = undefined

fileAttributeInfo_flags :: AttrLabelProxy "flags"
fileAttributeInfo_flags = AttrLabelProxy

#endif



#if ENABLE_OVERLOADING
instance O.HasAttributeList FileAttributeInfo
type instance O.AttributeList FileAttributeInfo = FileAttributeInfoAttributeList
type FileAttributeInfoAttributeList = ('[ '("name", FileAttributeInfoNameFieldInfo), '("type", FileAttributeInfoTypeFieldInfo), '("flags", FileAttributeInfoFlagsFieldInfo)] :: [(Symbol, *)])
#endif

#if ENABLE_OVERLOADING
type family ResolveFileAttributeInfoMethod (t :: Symbol) (o :: *) :: * where
    ResolveFileAttributeInfoMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveFileAttributeInfoMethod t FileAttributeInfo, O.MethodInfo info FileAttributeInfo p) => O.IsLabelProxy t (FileAttributeInfo -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveFileAttributeInfoMethod t FileAttributeInfo, O.MethodInfo info FileAttributeInfo p) => O.IsLabel t (FileAttributeInfo -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif

#endif