{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.FileInfo
(
FileInfo(..) ,
IsFileInfo ,
toFileInfo ,
#if defined(ENABLE_OVERLOADING)
ResolveFileInfoMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
FileInfoClearStatusMethodInfo ,
#endif
fileInfoClearStatus ,
#if defined(ENABLE_OVERLOADING)
FileInfoCopyIntoMethodInfo ,
#endif
fileInfoCopyInto ,
#if defined(ENABLE_OVERLOADING)
FileInfoDupMethodInfo ,
#endif
fileInfoDup ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeAsStringMethodInfo ,
#endif
fileInfoGetAttributeAsString ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeBooleanMethodInfo ,
#endif
fileInfoGetAttributeBoolean ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeByteStringMethodInfo,
#endif
fileInfoGetAttributeByteString ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeDataMethodInfo ,
#endif
fileInfoGetAttributeData ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeInt32MethodInfo ,
#endif
fileInfoGetAttributeInt32 ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeInt64MethodInfo ,
#endif
fileInfoGetAttributeInt64 ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeObjectMethodInfo ,
#endif
fileInfoGetAttributeObject ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeStatusMethodInfo ,
#endif
fileInfoGetAttributeStatus ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeStringMethodInfo ,
#endif
fileInfoGetAttributeString ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeStringvMethodInfo ,
#endif
fileInfoGetAttributeStringv ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeTypeMethodInfo ,
#endif
fileInfoGetAttributeType ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeUint32MethodInfo ,
#endif
fileInfoGetAttributeUint32 ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetAttributeUint64MethodInfo ,
#endif
fileInfoGetAttributeUint64 ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetContentTypeMethodInfo ,
#endif
fileInfoGetContentType ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetDeletionDateMethodInfo ,
#endif
fileInfoGetDeletionDate ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetDisplayNameMethodInfo ,
#endif
fileInfoGetDisplayName ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetEditNameMethodInfo ,
#endif
fileInfoGetEditName ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetEtagMethodInfo ,
#endif
fileInfoGetEtag ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetFileTypeMethodInfo ,
#endif
fileInfoGetFileType ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetIconMethodInfo ,
#endif
fileInfoGetIcon ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetIsBackupMethodInfo ,
#endif
fileInfoGetIsBackup ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetIsHiddenMethodInfo ,
#endif
fileInfoGetIsHidden ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetIsSymlinkMethodInfo ,
#endif
fileInfoGetIsSymlink ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetModificationDateTimeMethodInfo,
#endif
fileInfoGetModificationDateTime ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetModificationTimeMethodInfo ,
#endif
fileInfoGetModificationTime ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetNameMethodInfo ,
#endif
fileInfoGetName ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetSizeMethodInfo ,
#endif
fileInfoGetSize ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetSortOrderMethodInfo ,
#endif
fileInfoGetSortOrder ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetSymbolicIconMethodInfo ,
#endif
fileInfoGetSymbolicIcon ,
#if defined(ENABLE_OVERLOADING)
FileInfoGetSymlinkTargetMethodInfo ,
#endif
fileInfoGetSymlinkTarget ,
#if defined(ENABLE_OVERLOADING)
FileInfoHasAttributeMethodInfo ,
#endif
fileInfoHasAttribute ,
#if defined(ENABLE_OVERLOADING)
FileInfoHasNamespaceMethodInfo ,
#endif
fileInfoHasNamespace ,
#if defined(ENABLE_OVERLOADING)
FileInfoListAttributesMethodInfo ,
#endif
fileInfoListAttributes ,
fileInfoNew ,
#if defined(ENABLE_OVERLOADING)
FileInfoRemoveAttributeMethodInfo ,
#endif
fileInfoRemoveAttribute ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeMethodInfo ,
#endif
fileInfoSetAttribute ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeBooleanMethodInfo ,
#endif
fileInfoSetAttributeBoolean ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeByteStringMethodInfo,
#endif
fileInfoSetAttributeByteString ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeInt32MethodInfo ,
#endif
fileInfoSetAttributeInt32 ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeInt64MethodInfo ,
#endif
fileInfoSetAttributeInt64 ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeMaskMethodInfo ,
#endif
fileInfoSetAttributeMask ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeObjectMethodInfo ,
#endif
fileInfoSetAttributeObject ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeStatusMethodInfo ,
#endif
fileInfoSetAttributeStatus ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeStringMethodInfo ,
#endif
fileInfoSetAttributeString ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeStringvMethodInfo ,
#endif
fileInfoSetAttributeStringv ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeUint32MethodInfo ,
#endif
fileInfoSetAttributeUint32 ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetAttributeUint64MethodInfo ,
#endif
fileInfoSetAttributeUint64 ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetContentTypeMethodInfo ,
#endif
fileInfoSetContentType ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetDisplayNameMethodInfo ,
#endif
fileInfoSetDisplayName ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetEditNameMethodInfo ,
#endif
fileInfoSetEditName ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetFileTypeMethodInfo ,
#endif
fileInfoSetFileType ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetIconMethodInfo ,
#endif
fileInfoSetIcon ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetIsHiddenMethodInfo ,
#endif
fileInfoSetIsHidden ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetIsSymlinkMethodInfo ,
#endif
fileInfoSetIsSymlink ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetModificationDateTimeMethodInfo,
#endif
fileInfoSetModificationDateTime ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetModificationTimeMethodInfo ,
#endif
fileInfoSetModificationTime ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetNameMethodInfo ,
#endif
fileInfoSetName ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetSizeMethodInfo ,
#endif
fileInfoSetSize ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetSortOrderMethodInfo ,
#endif
fileInfoSetSortOrder ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetSymbolicIconMethodInfo ,
#endif
fileInfoSetSymbolicIcon ,
#if defined(ENABLE_OVERLOADING)
FileInfoSetSymlinkTargetMethodInfo ,
#endif
fileInfoSetSymlinkTarget ,
#if defined(ENABLE_OVERLOADING)
FileInfoUnsetAttributeMaskMethodInfo ,
#endif
fileInfoUnsetAttributeMask ,
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
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.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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 qualified GHC.OverloadedLabels as OL
import qualified GI.GLib.Structs.DateTime as GLib.DateTime
import qualified GI.GLib.Structs.TimeVal as GLib.TimeVal
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Icon as Gio.Icon
import {-# SOURCE #-} qualified GI.Gio.Structs.FileAttributeMatcher as Gio.FileAttributeMatcher
newtype FileInfo = FileInfo (SP.ManagedPtr FileInfo)
deriving (FileInfo -> FileInfo -> Bool
(FileInfo -> FileInfo -> Bool)
-> (FileInfo -> FileInfo -> Bool) -> Eq FileInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileInfo -> FileInfo -> Bool
$c/= :: FileInfo -> FileInfo -> Bool
== :: FileInfo -> FileInfo -> Bool
$c== :: FileInfo -> FileInfo -> Bool
Eq)
instance SP.ManagedPtrNewtype FileInfo where
toManagedPtr :: FileInfo -> ManagedPtr FileInfo
toManagedPtr (FileInfo ManagedPtr FileInfo
p) = ManagedPtr FileInfo
p
foreign import ccall "g_file_info_get_type"
c_g_file_info_get_type :: IO B.Types.GType
instance B.Types.TypedObject FileInfo where
glibType :: IO GType
glibType = IO GType
c_g_file_info_get_type
instance B.Types.GObject FileInfo
instance B.GValue.IsGValue FileInfo where
toGValue :: FileInfo -> IO GValue
toGValue FileInfo
o = do
GType
gtype <- IO GType
c_g_file_info_get_type
FileInfo -> (Ptr FileInfo -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileInfo
o (GType
-> (GValue -> Ptr FileInfo -> IO ()) -> Ptr FileInfo -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr FileInfo -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO FileInfo
fromGValue GValue
gv = do
Ptr FileInfo
ptr <- GValue -> IO (Ptr FileInfo)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr FileInfo)
(ManagedPtr FileInfo -> FileInfo) -> Ptr FileInfo -> IO FileInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr FileInfo -> FileInfo
FileInfo Ptr FileInfo
ptr
class (SP.GObject o, O.IsDescendantOf FileInfo o) => IsFileInfo o
instance (SP.GObject o, O.IsDescendantOf FileInfo o) => IsFileInfo o
instance O.HasParentTypes FileInfo
type instance O.ParentTypes FileInfo = '[GObject.Object.Object]
toFileInfo :: (MonadIO m, IsFileInfo o) => o -> m FileInfo
toFileInfo :: o -> m FileInfo
toFileInfo = IO FileInfo -> m FileInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileInfo -> m FileInfo)
-> (o -> IO FileInfo) -> o -> m FileInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr FileInfo -> FileInfo) -> o -> IO FileInfo
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr FileInfo -> FileInfo
FileInfo
#if defined(ENABLE_OVERLOADING)
type family ResolveFileInfoMethod (t :: Symbol) (o :: *) :: * where
ResolveFileInfoMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveFileInfoMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveFileInfoMethod "clearStatus" o = FileInfoClearStatusMethodInfo
ResolveFileInfoMethod "copyInto" o = FileInfoCopyIntoMethodInfo
ResolveFileInfoMethod "dup" o = FileInfoDupMethodInfo
ResolveFileInfoMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveFileInfoMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveFileInfoMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveFileInfoMethod "hasAttribute" o = FileInfoHasAttributeMethodInfo
ResolveFileInfoMethod "hasNamespace" o = FileInfoHasNamespaceMethodInfo
ResolveFileInfoMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveFileInfoMethod "listAttributes" o = FileInfoListAttributesMethodInfo
ResolveFileInfoMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveFileInfoMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveFileInfoMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveFileInfoMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveFileInfoMethod "removeAttribute" o = FileInfoRemoveAttributeMethodInfo
ResolveFileInfoMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveFileInfoMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveFileInfoMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveFileInfoMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveFileInfoMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveFileInfoMethod "unsetAttributeMask" o = FileInfoUnsetAttributeMaskMethodInfo
ResolveFileInfoMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveFileInfoMethod "getAttributeAsString" o = FileInfoGetAttributeAsStringMethodInfo
ResolveFileInfoMethod "getAttributeBoolean" o = FileInfoGetAttributeBooleanMethodInfo
ResolveFileInfoMethod "getAttributeByteString" o = FileInfoGetAttributeByteStringMethodInfo
ResolveFileInfoMethod "getAttributeData" o = FileInfoGetAttributeDataMethodInfo
ResolveFileInfoMethod "getAttributeInt32" o = FileInfoGetAttributeInt32MethodInfo
ResolveFileInfoMethod "getAttributeInt64" o = FileInfoGetAttributeInt64MethodInfo
ResolveFileInfoMethod "getAttributeObject" o = FileInfoGetAttributeObjectMethodInfo
ResolveFileInfoMethod "getAttributeStatus" o = FileInfoGetAttributeStatusMethodInfo
ResolveFileInfoMethod "getAttributeString" o = FileInfoGetAttributeStringMethodInfo
ResolveFileInfoMethod "getAttributeStringv" o = FileInfoGetAttributeStringvMethodInfo
ResolveFileInfoMethod "getAttributeType" o = FileInfoGetAttributeTypeMethodInfo
ResolveFileInfoMethod "getAttributeUint32" o = FileInfoGetAttributeUint32MethodInfo
ResolveFileInfoMethod "getAttributeUint64" o = FileInfoGetAttributeUint64MethodInfo
ResolveFileInfoMethod "getContentType" o = FileInfoGetContentTypeMethodInfo
ResolveFileInfoMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveFileInfoMethod "getDeletionDate" o = FileInfoGetDeletionDateMethodInfo
ResolveFileInfoMethod "getDisplayName" o = FileInfoGetDisplayNameMethodInfo
ResolveFileInfoMethod "getEditName" o = FileInfoGetEditNameMethodInfo
ResolveFileInfoMethod "getEtag" o = FileInfoGetEtagMethodInfo
ResolveFileInfoMethod "getFileType" o = FileInfoGetFileTypeMethodInfo
ResolveFileInfoMethod "getIcon" o = FileInfoGetIconMethodInfo
ResolveFileInfoMethod "getIsBackup" o = FileInfoGetIsBackupMethodInfo
ResolveFileInfoMethod "getIsHidden" o = FileInfoGetIsHiddenMethodInfo
ResolveFileInfoMethod "getIsSymlink" o = FileInfoGetIsSymlinkMethodInfo
ResolveFileInfoMethod "getModificationDateTime" o = FileInfoGetModificationDateTimeMethodInfo
ResolveFileInfoMethod "getModificationTime" o = FileInfoGetModificationTimeMethodInfo
ResolveFileInfoMethod "getName" o = FileInfoGetNameMethodInfo
ResolveFileInfoMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveFileInfoMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveFileInfoMethod "getSize" o = FileInfoGetSizeMethodInfo
ResolveFileInfoMethod "getSortOrder" o = FileInfoGetSortOrderMethodInfo
ResolveFileInfoMethod "getSymbolicIcon" o = FileInfoGetSymbolicIconMethodInfo
ResolveFileInfoMethod "getSymlinkTarget" o = FileInfoGetSymlinkTargetMethodInfo
ResolveFileInfoMethod "setAttribute" o = FileInfoSetAttributeMethodInfo
ResolveFileInfoMethod "setAttributeBoolean" o = FileInfoSetAttributeBooleanMethodInfo
ResolveFileInfoMethod "setAttributeByteString" o = FileInfoSetAttributeByteStringMethodInfo
ResolveFileInfoMethod "setAttributeInt32" o = FileInfoSetAttributeInt32MethodInfo
ResolveFileInfoMethod "setAttributeInt64" o = FileInfoSetAttributeInt64MethodInfo
ResolveFileInfoMethod "setAttributeMask" o = FileInfoSetAttributeMaskMethodInfo
ResolveFileInfoMethod "setAttributeObject" o = FileInfoSetAttributeObjectMethodInfo
ResolveFileInfoMethod "setAttributeStatus" o = FileInfoSetAttributeStatusMethodInfo
ResolveFileInfoMethod "setAttributeString" o = FileInfoSetAttributeStringMethodInfo
ResolveFileInfoMethod "setAttributeStringv" o = FileInfoSetAttributeStringvMethodInfo
ResolveFileInfoMethod "setAttributeUint32" o = FileInfoSetAttributeUint32MethodInfo
ResolveFileInfoMethod "setAttributeUint64" o = FileInfoSetAttributeUint64MethodInfo
ResolveFileInfoMethod "setContentType" o = FileInfoSetContentTypeMethodInfo
ResolveFileInfoMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveFileInfoMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveFileInfoMethod "setDisplayName" o = FileInfoSetDisplayNameMethodInfo
ResolveFileInfoMethod "setEditName" o = FileInfoSetEditNameMethodInfo
ResolveFileInfoMethod "setFileType" o = FileInfoSetFileTypeMethodInfo
ResolveFileInfoMethod "setIcon" o = FileInfoSetIconMethodInfo
ResolveFileInfoMethod "setIsHidden" o = FileInfoSetIsHiddenMethodInfo
ResolveFileInfoMethod "setIsSymlink" o = FileInfoSetIsSymlinkMethodInfo
ResolveFileInfoMethod "setModificationDateTime" o = FileInfoSetModificationDateTimeMethodInfo
ResolveFileInfoMethod "setModificationTime" o = FileInfoSetModificationTimeMethodInfo
ResolveFileInfoMethod "setName" o = FileInfoSetNameMethodInfo
ResolveFileInfoMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveFileInfoMethod "setSize" o = FileInfoSetSizeMethodInfo
ResolveFileInfoMethod "setSortOrder" o = FileInfoSetSortOrderMethodInfo
ResolveFileInfoMethod "setSymbolicIcon" o = FileInfoSetSymbolicIconMethodInfo
ResolveFileInfoMethod "setSymlinkTarget" o = FileInfoSetSymlinkTargetMethodInfo
ResolveFileInfoMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveFileInfoMethod t FileInfo, O.MethodInfo info FileInfo p) => OL.IsLabel t (FileInfo -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileInfo
type instance O.AttributeList FileInfo = FileInfoAttributeList
type FileInfoAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FileInfo = FileInfoSignalList
type FileInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_file_info_new" g_file_info_new ::
IO (Ptr FileInfo)
fileInfoNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FileInfo
fileInfoNew :: m FileInfo
fileInfoNew = IO FileInfo -> m FileInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileInfo -> m FileInfo) -> IO FileInfo -> m FileInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
result <- IO (Ptr FileInfo)
g_file_info_new
Text -> Ptr FileInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoNew" Ptr FileInfo
result
FileInfo
result' <- ((ManagedPtr FileInfo -> FileInfo) -> Ptr FileInfo -> IO FileInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FileInfo -> FileInfo
FileInfo) Ptr FileInfo
result
FileInfo -> IO FileInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FileInfo
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_file_info_clear_status" g_file_info_clear_status ::
Ptr FileInfo ->
IO ()
fileInfoClearStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m ()
fileInfoClearStatus :: a -> m ()
fileInfoClearStatus a
info = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr FileInfo -> IO ()
g_file_info_clear_status Ptr FileInfo
info'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoClearStatusMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoClearStatusMethodInfo a signature where
overloadedMethod = fileInfoClearStatus
#endif
foreign import ccall "g_file_info_copy_into" g_file_info_copy_into ::
Ptr FileInfo ->
Ptr FileInfo ->
IO ()
fileInfoCopyInto ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a, IsFileInfo b) =>
a
-> b
-> m ()
fileInfoCopyInto :: a -> b -> m ()
fileInfoCopyInto a
srcInfo b
destInfo = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
srcInfo' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srcInfo
Ptr FileInfo
destInfo' <- b -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
destInfo
Ptr FileInfo -> Ptr FileInfo -> IO ()
g_file_info_copy_into Ptr FileInfo
srcInfo' Ptr FileInfo
destInfo'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
srcInfo
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
destInfo
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoCopyIntoMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, IsFileInfo b) => O.MethodInfo FileInfoCopyIntoMethodInfo a signature where
overloadedMethod = fileInfoCopyInto
#endif
foreign import ccall "g_file_info_dup" g_file_info_dup ::
Ptr FileInfo ->
IO (Ptr FileInfo)
fileInfoDup ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m FileInfo
fileInfoDup :: a -> m FileInfo
fileInfoDup a
other = IO FileInfo -> m FileInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileInfo -> m FileInfo) -> IO FileInfo -> m FileInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
other' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
other
Ptr FileInfo
result <- Ptr FileInfo -> IO (Ptr FileInfo)
g_file_info_dup Ptr FileInfo
other'
Text -> Ptr FileInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoDup" Ptr FileInfo
result
FileInfo
result' <- ((ManagedPtr FileInfo -> FileInfo) -> Ptr FileInfo -> IO FileInfo
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr FileInfo -> FileInfo
FileInfo) Ptr FileInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
other
FileInfo -> IO FileInfo
forall (m :: * -> *) a. Monad m => a -> m a
return FileInfo
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoDupMethodInfo
instance (signature ~ (m FileInfo), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoDupMethodInfo a signature where
overloadedMethod = fileInfoDup
#endif
foreign import ccall "g_file_info_get_attribute_as_string" g_file_info_get_attribute_as_string ::
Ptr FileInfo ->
CString ->
IO CString
fileInfoGetAttributeAsString ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m (Maybe T.Text)
fileInfoGetAttributeAsString :: a -> Text -> m (Maybe Text)
fileInfoGetAttributeAsString a
info Text
attribute = 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
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CString
result <- Ptr FileInfo -> CString -> IO CString
g_file_info_get_attribute_as_string Ptr FileInfo
info' CString
attribute'
Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
result'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeAsStringMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeAsStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeAsString
#endif
foreign import ccall "g_file_info_get_attribute_boolean" g_file_info_get_attribute_boolean ::
Ptr FileInfo ->
CString ->
IO CInt
fileInfoGetAttributeBoolean ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Bool
fileInfoGetAttributeBoolean :: a -> Text -> m Bool
fileInfoGetAttributeBoolean a
info Text
attribute = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CInt
result <- Ptr FileInfo -> CString -> IO CInt
g_file_info_get_attribute_boolean Ptr FileInfo
info' CString
attribute'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeBooleanMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeBooleanMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeBoolean
#endif
foreign import ccall "g_file_info_get_attribute_byte_string" g_file_info_get_attribute_byte_string ::
Ptr FileInfo ->
CString ->
IO CString
fileInfoGetAttributeByteString ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m T.Text
fileInfoGetAttributeByteString :: a -> Text -> m Text
fileInfoGetAttributeByteString a
info Text
attribute = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CString
result <- Ptr FileInfo -> CString -> IO CString
g_file_info_get_attribute_byte_string Ptr FileInfo
info' CString
attribute'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetAttributeByteString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeByteStringMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeByteStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeByteString
#endif
foreign import ccall "g_file_info_get_attribute_data" g_file_info_get_attribute_data ::
Ptr FileInfo ->
CString ->
Ptr CUInt ->
Ptr (Ptr ()) ->
Ptr CUInt ->
IO CInt
fileInfoGetAttributeData ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ((Bool, Gio.Enums.FileAttributeType, Ptr (), Gio.Enums.FileAttributeStatus))
fileInfoGetAttributeData :: a
-> Text -> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
fileInfoGetAttributeData a
info Text
attribute = IO (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
-> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
-> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus))
-> IO (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
-> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr CUInt
type_ <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr (Ptr ())
valuePp <- IO (Ptr (Ptr ()))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr ()))
Ptr CUInt
status <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
CInt
result <- Ptr FileInfo
-> CString -> Ptr CUInt -> Ptr (Ptr ()) -> Ptr CUInt -> IO CInt
g_file_info_get_attribute_data Ptr FileInfo
info' CString
attribute' Ptr CUInt
type_ Ptr (Ptr ())
valuePp Ptr CUInt
status
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CUInt
type_' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
type_
let type_'' :: FileAttributeType
type_'' = (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
type_'
Ptr ()
valuePp' <- Ptr (Ptr ()) -> IO (Ptr ())
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr ())
valuePp
CUInt
status' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
status
let status'' :: FileAttributeStatus
status'' = (Int -> FileAttributeStatus
forall a. Enum a => Int -> a
toEnum (Int -> FileAttributeStatus)
-> (CUInt -> Int) -> CUInt -> FileAttributeStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
status'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
type_
Ptr (Ptr ()) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr ())
valuePp
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
status
(Bool, FileAttributeType, Ptr (), FileAttributeStatus)
-> IO (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', FileAttributeType
type_'', Ptr ()
valuePp', FileAttributeStatus
status'')
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeDataMethodInfo
instance (signature ~ (T.Text -> m ((Bool, Gio.Enums.FileAttributeType, Ptr (), Gio.Enums.FileAttributeStatus))), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeDataMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeData
#endif
foreign import ccall "g_file_info_get_attribute_int32" g_file_info_get_attribute_int32 ::
Ptr FileInfo ->
CString ->
IO Int32
fileInfoGetAttributeInt32 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Int32
fileInfoGetAttributeInt32 :: a -> Text -> m Int32
fileInfoGetAttributeInt32 a
info Text
attribute = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Int32
result <- Ptr FileInfo -> CString -> IO Int32
g_file_info_get_attribute_int32 Ptr FileInfo
info' CString
attribute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeInt32MethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeInt32MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeInt32
#endif
foreign import ccall "g_file_info_get_attribute_int64" g_file_info_get_attribute_int64 ::
Ptr FileInfo ->
CString ->
IO Int64
fileInfoGetAttributeInt64 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Int64
fileInfoGetAttributeInt64 :: a -> Text -> m Int64
fileInfoGetAttributeInt64 a
info Text
attribute = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Int64
result <- Ptr FileInfo -> CString -> IO Int64
g_file_info_get_attribute_int64 Ptr FileInfo
info' CString
attribute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeInt64MethodInfo
instance (signature ~ (T.Text -> m Int64), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeInt64MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeInt64
#endif
foreign import ccall "g_file_info_get_attribute_object" g_file_info_get_attribute_object ::
Ptr FileInfo ->
CString ->
IO (Ptr GObject.Object.Object)
fileInfoGetAttributeObject ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m GObject.Object.Object
fileInfoGetAttributeObject :: a -> Text -> m Object
fileInfoGetAttributeObject a
info Text
attribute = IO Object -> m Object
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Object -> m Object) -> IO Object -> m Object
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr Object
result <- Ptr FileInfo -> CString -> IO (Ptr Object)
g_file_info_get_attribute_object Ptr FileInfo
info' CString
attribute'
Text -> Ptr Object -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetAttributeObject" Ptr Object
result
Object
result' <- ((ManagedPtr Object -> Object) -> Ptr Object -> IO Object
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Object -> Object
GObject.Object.Object) Ptr Object
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Object -> IO Object
forall (m :: * -> *) a. Monad m => a -> m a
return Object
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeObjectMethodInfo
instance (signature ~ (T.Text -> m GObject.Object.Object), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeObjectMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeObject
#endif
foreign import ccall "g_file_info_get_attribute_status" g_file_info_get_attribute_status ::
Ptr FileInfo ->
CString ->
IO CUInt
fileInfoGetAttributeStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Gio.Enums.FileAttributeStatus
fileInfoGetAttributeStatus :: a -> Text -> m FileAttributeStatus
fileInfoGetAttributeStatus a
info Text
attribute = IO FileAttributeStatus -> m FileAttributeStatus
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileAttributeStatus -> m FileAttributeStatus)
-> IO FileAttributeStatus -> m FileAttributeStatus
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CUInt
result <- Ptr FileInfo -> CString -> IO CUInt
g_file_info_get_attribute_status Ptr FileInfo
info' CString
attribute'
let result' :: FileAttributeStatus
result' = (Int -> FileAttributeStatus
forall a. Enum a => Int -> a
toEnum (Int -> FileAttributeStatus)
-> (CUInt -> Int) -> CUInt -> FileAttributeStatus
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
FileAttributeStatus -> IO FileAttributeStatus
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeStatus
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStatusMethodInfo
instance (signature ~ (T.Text -> m Gio.Enums.FileAttributeStatus), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeStatusMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeStatus
#endif
foreign import ccall "g_file_info_get_attribute_string" g_file_info_get_attribute_string ::
Ptr FileInfo ->
CString ->
IO CString
fileInfoGetAttributeString ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m T.Text
fileInfoGetAttributeString :: a -> Text -> m Text
fileInfoGetAttributeString a
info Text
attribute = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CString
result <- Ptr FileInfo -> CString -> IO CString
g_file_info_get_attribute_string Ptr FileInfo
info' CString
attribute'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetAttributeString" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStringMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeString
#endif
foreign import ccall "g_file_info_get_attribute_stringv" g_file_info_get_attribute_stringv ::
Ptr FileInfo ->
CString ->
IO (Ptr CString)
fileInfoGetAttributeStringv ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m [T.Text]
fileInfoGetAttributeStringv :: a -> Text -> m [Text]
fileInfoGetAttributeStringv a
info Text
attribute = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr CString
result <- Ptr FileInfo -> CString -> IO (Ptr CString)
g_file_info_get_attribute_stringv Ptr FileInfo
info' CString
attribute'
Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetAttributeStringv" Ptr CString
result
[Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStringvMethodInfo
instance (signature ~ (T.Text -> m [T.Text]), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeStringvMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeStringv
#endif
foreign import ccall "g_file_info_get_attribute_type" g_file_info_get_attribute_type ::
Ptr FileInfo ->
CString ->
IO CUInt
fileInfoGetAttributeType ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Gio.Enums.FileAttributeType
fileInfoGetAttributeType :: a -> Text -> m FileAttributeType
fileInfoGetAttributeType a
info Text
attribute = 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
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CUInt
result <- Ptr FileInfo -> CString -> IO CUInt
g_file_info_get_attribute_type Ptr FileInfo
info' CString
attribute'
let result' :: FileAttributeType
result' = (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
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
FileAttributeType -> IO FileAttributeType
forall (m :: * -> *) a. Monad m => a -> m a
return FileAttributeType
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeTypeMethodInfo
instance (signature ~ (T.Text -> m Gio.Enums.FileAttributeType), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeTypeMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeType
#endif
foreign import ccall "g_file_info_get_attribute_uint32" g_file_info_get_attribute_uint32 ::
Ptr FileInfo ->
CString ->
IO Word32
fileInfoGetAttributeUint32 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Word32
fileInfoGetAttributeUint32 :: a -> Text -> m Word32
fileInfoGetAttributeUint32 a
info Text
attribute = IO Word32 -> m Word32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Word32
result <- Ptr FileInfo -> CString -> IO Word32
g_file_info_get_attribute_uint32 Ptr FileInfo
info' CString
attribute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeUint32MethodInfo
instance (signature ~ (T.Text -> m Word32), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeUint32MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeUint32
#endif
foreign import ccall "g_file_info_get_attribute_uint64" g_file_info_get_attribute_uint64 ::
Ptr FileInfo ->
CString ->
IO Word64
fileInfoGetAttributeUint64 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Word64
fileInfoGetAttributeUint64 :: a -> Text -> m Word64
fileInfoGetAttributeUint64 a
info Text
attribute = IO Word64 -> m Word64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Word64
result <- Ptr FileInfo -> CString -> IO Word64
g_file_info_get_attribute_uint64 Ptr FileInfo
info' CString
attribute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Word64 -> IO Word64
forall (m :: * -> *) a. Monad m => a -> m a
return Word64
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeUint64MethodInfo
instance (signature ~ (T.Text -> m Word64), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetAttributeUint64MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeUint64
#endif
foreign import ccall "g_file_info_get_content_type" g_file_info_get_content_type ::
Ptr FileInfo ->
IO CString
fileInfoGetContentType ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m T.Text
fileInfoGetContentType :: a -> m Text
fileInfoGetContentType a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_content_type Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetContentType" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetContentTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetContentTypeMethodInfo a signature where
overloadedMethod = fileInfoGetContentType
#endif
foreign import ccall "g_file_info_get_deletion_date" g_file_info_get_deletion_date ::
Ptr FileInfo ->
IO (Ptr GLib.DateTime.DateTime)
fileInfoGetDeletionDate ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m GLib.DateTime.DateTime
fileInfoGetDeletionDate :: a -> m DateTime
fileInfoGetDeletionDate a
info = IO DateTime -> m DateTime
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DateTime -> m DateTime) -> IO DateTime -> m DateTime
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr DateTime
result <- Ptr FileInfo -> IO (Ptr DateTime)
g_file_info_get_deletion_date Ptr FileInfo
info'
Text -> Ptr DateTime -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetDeletionDate" Ptr DateTime
result
DateTime
result' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
DateTime -> IO DateTime
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetDeletionDateMethodInfo
instance (signature ~ (m GLib.DateTime.DateTime), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetDeletionDateMethodInfo a signature where
overloadedMethod = fileInfoGetDeletionDate
#endif
foreign import ccall "g_file_info_get_display_name" g_file_info_get_display_name ::
Ptr FileInfo ->
IO CString
fileInfoGetDisplayName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m T.Text
fileInfoGetDisplayName :: a -> m Text
fileInfoGetDisplayName a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_display_name Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetDisplayName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetDisplayNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetDisplayNameMethodInfo a signature where
overloadedMethod = fileInfoGetDisplayName
#endif
foreign import ccall "g_file_info_get_edit_name" g_file_info_get_edit_name ::
Ptr FileInfo ->
IO CString
fileInfoGetEditName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m T.Text
fileInfoGetEditName :: a -> m Text
fileInfoGetEditName a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_edit_name Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetEditName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetEditNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetEditNameMethodInfo a signature where
overloadedMethod = fileInfoGetEditName
#endif
foreign import ccall "g_file_info_get_etag" g_file_info_get_etag ::
Ptr FileInfo ->
IO CString
fileInfoGetEtag ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m T.Text
fileInfoGetEtag :: a -> m Text
fileInfoGetEtag a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_etag Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetEtag" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetEtagMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetEtagMethodInfo a signature where
overloadedMethod = fileInfoGetEtag
#endif
foreign import ccall "g_file_info_get_file_type" g_file_info_get_file_type ::
Ptr FileInfo ->
IO CUInt
fileInfoGetFileType ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Gio.Enums.FileType
fileInfoGetFileType :: a -> m FileType
fileInfoGetFileType a
info = IO FileType -> m FileType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO FileType -> m FileType) -> IO FileType -> m FileType
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CUInt
result <- Ptr FileInfo -> IO CUInt
g_file_info_get_file_type Ptr FileInfo
info'
let result' :: FileType
result' = (Int -> FileType
forall a. Enum a => Int -> a
toEnum (Int -> FileType) -> (CUInt -> Int) -> CUInt -> FileType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
FileType -> IO FileType
forall (m :: * -> *) a. Monad m => a -> m a
return FileType
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetFileTypeMethodInfo
instance (signature ~ (m Gio.Enums.FileType), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetFileTypeMethodInfo a signature where
overloadedMethod = fileInfoGetFileType
#endif
foreign import ccall "g_file_info_get_icon" g_file_info_get_icon ::
Ptr FileInfo ->
IO (Ptr Gio.Icon.Icon)
fileInfoGetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Gio.Icon.Icon
fileInfoGetIcon :: a -> m Icon
fileInfoGetIcon a
info = IO Icon -> m Icon
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Icon -> m Icon) -> IO Icon -> m Icon
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Icon
result <- Ptr FileInfo -> IO (Ptr Icon)
g_file_info_get_icon Ptr FileInfo
info'
Text -> Ptr Icon -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetIcon" Ptr Icon
result
Icon
result' <- ((ManagedPtr Icon -> Icon) -> Ptr Icon -> IO Icon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Icon -> Icon
Gio.Icon.Icon) Ptr Icon
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Icon -> IO Icon
forall (m :: * -> *) a. Monad m => a -> m a
return Icon
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetIconMethodInfo a signature where
overloadedMethod = fileInfoGetIcon
#endif
foreign import ccall "g_file_info_get_is_backup" g_file_info_get_is_backup ::
Ptr FileInfo ->
IO CInt
fileInfoGetIsBackup ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Bool
fileInfoGetIsBackup :: a -> m Bool
fileInfoGetIsBackup a
info = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CInt
result <- Ptr FileInfo -> IO CInt
g_file_info_get_is_backup Ptr FileInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsBackupMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetIsBackupMethodInfo a signature where
overloadedMethod = fileInfoGetIsBackup
#endif
foreign import ccall "g_file_info_get_is_hidden" g_file_info_get_is_hidden ::
Ptr FileInfo ->
IO CInt
fileInfoGetIsHidden ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Bool
fileInfoGetIsHidden :: a -> m Bool
fileInfoGetIsHidden a
info = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CInt
result <- Ptr FileInfo -> IO CInt
g_file_info_get_is_hidden Ptr FileInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsHiddenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetIsHiddenMethodInfo a signature where
overloadedMethod = fileInfoGetIsHidden
#endif
foreign import ccall "g_file_info_get_is_symlink" g_file_info_get_is_symlink ::
Ptr FileInfo ->
IO CInt
fileInfoGetIsSymlink ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Bool
fileInfoGetIsSymlink :: a -> m Bool
fileInfoGetIsSymlink a
info = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CInt
result <- Ptr FileInfo -> IO CInt
g_file_info_get_is_symlink Ptr FileInfo
info'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsSymlinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetIsSymlinkMethodInfo a signature where
overloadedMethod = fileInfoGetIsSymlink
#endif
foreign import ccall "g_file_info_get_modification_date_time" g_file_info_get_modification_date_time ::
Ptr FileInfo ->
IO (Ptr GLib.DateTime.DateTime)
fileInfoGetModificationDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m (Maybe GLib.DateTime.DateTime)
fileInfoGetModificationDateTime :: a -> m (Maybe DateTime)
fileInfoGetModificationDateTime a
info = IO (Maybe DateTime) -> m (Maybe DateTime)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DateTime) -> m (Maybe DateTime))
-> IO (Maybe DateTime) -> m (Maybe DateTime)
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr DateTime
result <- Ptr FileInfo -> IO (Ptr DateTime)
g_file_info_get_modification_date_time Ptr FileInfo
info'
Maybe DateTime
maybeResult <- Ptr DateTime
-> (Ptr DateTime -> IO DateTime) -> IO (Maybe DateTime)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr DateTime
result ((Ptr DateTime -> IO DateTime) -> IO (Maybe DateTime))
-> (Ptr DateTime -> IO DateTime) -> IO (Maybe DateTime)
forall a b. (a -> b) -> a -> b
$ \Ptr DateTime
result' -> do
DateTime
result'' <- ((ManagedPtr DateTime -> DateTime) -> Ptr DateTime -> IO DateTime
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr DateTime -> DateTime
GLib.DateTime.DateTime) Ptr DateTime
result'
DateTime -> IO DateTime
forall (m :: * -> *) a. Monad m => a -> m a
return DateTime
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Maybe DateTime -> IO (Maybe DateTime)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DateTime
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetModificationDateTimeMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetModificationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoGetModificationDateTime
#endif
foreign import ccall "g_file_info_get_modification_time" g_file_info_get_modification_time ::
Ptr FileInfo ->
Ptr GLib.TimeVal.TimeVal ->
IO ()
{-# DEPRECATED fileInfoGetModificationTime ["(Since version 2.62)","Use 'GI.Gio.Objects.FileInfo.fileInfoGetModificationDateTime' instead, as"," t'GI.GLib.Structs.TimeVal.TimeVal' is deprecated due to the year 2038 problem."] #-}
fileInfoGetModificationTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m (GLib.TimeVal.TimeVal)
fileInfoGetModificationTime :: a -> m TimeVal
fileInfoGetModificationTime a
info = IO TimeVal -> m TimeVal
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TimeVal -> m TimeVal) -> IO TimeVal -> m TimeVal
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr TimeVal
result_ <- Int -> IO (Ptr TimeVal)
forall a. Int -> IO (Ptr a)
SP.callocBytes Int
16 :: IO (Ptr GLib.TimeVal.TimeVal)
Ptr FileInfo -> Ptr TimeVal -> IO ()
g_file_info_get_modification_time Ptr FileInfo
info' Ptr TimeVal
result_
TimeVal
result_' <- ((ManagedPtr TimeVal -> TimeVal) -> Ptr TimeVal -> IO TimeVal
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapPtr ManagedPtr TimeVal -> TimeVal
GLib.TimeVal.TimeVal) Ptr TimeVal
result_
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
TimeVal -> IO TimeVal
forall (m :: * -> *) a. Monad m => a -> m a
return TimeVal
result_'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetModificationTimeMethodInfo
instance (signature ~ (m (GLib.TimeVal.TimeVal)), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetModificationTimeMethodInfo a signature where
overloadedMethod = fileInfoGetModificationTime
#endif
foreign import ccall "g_file_info_get_name" g_file_info_get_name ::
Ptr FileInfo ->
IO CString
fileInfoGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m [Char]
fileInfoGetName :: a -> m [Char]
fileInfoGetName a
info = IO [Char] -> m [Char]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Char] -> m [Char]) -> IO [Char] -> m [Char]
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_name Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetName" CString
result
[Char]
result' <- HasCallStack => CString -> IO [Char]
CString -> IO [Char]
cstringToString CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
[Char] -> IO [Char]
forall (m :: * -> *) a. Monad m => a -> m a
return [Char]
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetNameMethodInfo
instance (signature ~ (m [Char]), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetNameMethodInfo a signature where
overloadedMethod = fileInfoGetName
#endif
foreign import ccall "g_file_info_get_size" g_file_info_get_size ::
Ptr FileInfo ->
IO Int64
fileInfoGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Int64
fileInfoGetSize :: a -> m Int64
fileInfoGetSize a
info = IO Int64 -> m Int64
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Int64
result <- Ptr FileInfo -> IO Int64
g_file_info_get_size Ptr FileInfo
info'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Int64 -> IO Int64
forall (m :: * -> *) a. Monad m => a -> m a
return Int64
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSizeMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetSizeMethodInfo a signature where
overloadedMethod = fileInfoGetSize
#endif
foreign import ccall "g_file_info_get_sort_order" g_file_info_get_sort_order ::
Ptr FileInfo ->
IO Int32
fileInfoGetSortOrder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Int32
fileInfoGetSortOrder :: a -> m Int32
fileInfoGetSortOrder a
info = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Int32
result <- Ptr FileInfo -> IO Int32
g_file_info_get_sort_order Ptr FileInfo
info'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSortOrderMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetSortOrderMethodInfo a signature where
overloadedMethod = fileInfoGetSortOrder
#endif
foreign import ccall "g_file_info_get_symbolic_icon" g_file_info_get_symbolic_icon ::
Ptr FileInfo ->
IO (Ptr Gio.Icon.Icon)
fileInfoGetSymbolicIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m Gio.Icon.Icon
fileInfoGetSymbolicIcon :: a -> m Icon
fileInfoGetSymbolicIcon a
info = IO Icon -> m Icon
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Icon -> m Icon) -> IO Icon -> m Icon
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Icon
result <- Ptr FileInfo -> IO (Ptr Icon)
g_file_info_get_symbolic_icon Ptr FileInfo
info'
Text -> Ptr Icon -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetSymbolicIcon" Ptr Icon
result
Icon
result' <- ((ManagedPtr Icon -> Icon) -> Ptr Icon -> IO Icon
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Icon -> Icon
Gio.Icon.Icon) Ptr Icon
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Icon -> IO Icon
forall (m :: * -> *) a. Monad m => a -> m a
return Icon
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSymbolicIconMethodInfo
instance (signature ~ (m Gio.Icon.Icon), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetSymbolicIconMethodInfo a signature where
overloadedMethod = fileInfoGetSymbolicIcon
#endif
foreign import ccall "g_file_info_get_symlink_target" g_file_info_get_symlink_target ::
Ptr FileInfo ->
IO CString
fileInfoGetSymlinkTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m T.Text
fileInfoGetSymlinkTarget :: a -> m Text
fileInfoGetSymlinkTarget a
info = IO Text -> m Text
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
result <- Ptr FileInfo -> IO CString
g_file_info_get_symlink_target Ptr FileInfo
info'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"fileInfoGetSymlinkTarget" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSymlinkTargetMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoGetSymlinkTargetMethodInfo a signature where
overloadedMethod = fileInfoGetSymlinkTarget
#endif
foreign import ccall "g_file_info_has_attribute" g_file_info_has_attribute ::
Ptr FileInfo ->
CString ->
IO CInt
fileInfoHasAttribute ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Bool
fileInfoHasAttribute :: a -> Text -> m Bool
fileInfoHasAttribute a
info Text
attribute = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CInt
result <- Ptr FileInfo -> CString -> IO CInt
g_file_info_has_attribute Ptr FileInfo
info' CString
attribute'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoHasAttributeMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoHasAttributeMethodInfo a signature where
overloadedMethod = fileInfoHasAttribute
#endif
foreign import ccall "g_file_info_has_namespace" g_file_info_has_namespace ::
Ptr FileInfo ->
CString ->
IO CInt
fileInfoHasNamespace ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m Bool
fileInfoHasNamespace :: a -> Text -> m Bool
fileInfoHasNamespace a
info Text
nameSpace = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
nameSpace' <- Text -> IO CString
textToCString Text
nameSpace
CInt
result <- Ptr FileInfo -> CString -> IO CInt
g_file_info_has_namespace Ptr FileInfo
info' CString
nameSpace'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
nameSpace'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoHasNamespaceMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoHasNamespaceMethodInfo a signature where
overloadedMethod = fileInfoHasNamespace
#endif
foreign import ccall "g_file_info_list_attributes" g_file_info_list_attributes ::
Ptr FileInfo ->
CString ->
IO (Ptr CString)
fileInfoListAttributes ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Maybe (T.Text)
-> m (Maybe [T.Text])
fileInfoListAttributes :: a -> Maybe Text -> m (Maybe [Text])
fileInfoListAttributes a
info Maybe Text
nameSpace = 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
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
maybeNameSpace <- case Maybe Text
nameSpace of
Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just Text
jNameSpace -> do
CString
jNameSpace' <- Text -> IO CString
textToCString Text
jNameSpace
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jNameSpace'
Ptr CString
result <- Ptr FileInfo -> CString -> IO (Ptr CString)
g_file_info_list_attributes Ptr FileInfo
info' CString
maybeNameSpace
Maybe [Text]
maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CString
result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text]))
-> (Ptr CString -> IO [Text]) -> IO (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ \Ptr CString
result' -> do
[Text]
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result'
[Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeNameSpace
Maybe [Text] -> IO (Maybe [Text])
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe [Text]
maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoListAttributesMethodInfo
instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoListAttributesMethodInfo a signature where
overloadedMethod = fileInfoListAttributes
#endif
foreign import ccall "g_file_info_remove_attribute" g_file_info_remove_attribute ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoRemoveAttribute ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ()
fileInfoRemoveAttribute :: a -> Text -> m ()
fileInfoRemoveAttribute a
info Text
attribute = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr FileInfo -> CString -> IO ()
g_file_info_remove_attribute Ptr FileInfo
info' CString
attribute'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoRemoveAttributeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoRemoveAttributeMethodInfo a signature where
overloadedMethod = fileInfoRemoveAttribute
#endif
foreign import ccall "g_file_info_set_attribute" g_file_info_set_attribute ::
Ptr FileInfo ->
CString ->
CUInt ->
Ptr () ->
IO ()
fileInfoSetAttribute ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Gio.Enums.FileAttributeType
-> Ptr ()
-> m ()
fileInfoSetAttribute :: a -> Text -> FileAttributeType -> Ptr () -> m ()
fileInfoSetAttribute a
info Text
attribute FileAttributeType
type_ Ptr ()
valueP = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
let type_' :: CUInt
type_' = (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
type_
Ptr FileInfo -> CString -> CUInt -> Ptr () -> IO ()
g_file_info_set_attribute Ptr FileInfo
info' CString
attribute' CUInt
type_' Ptr ()
valueP
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeMethodInfo
instance (signature ~ (T.Text -> Gio.Enums.FileAttributeType -> Ptr () -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeMethodInfo a signature where
overloadedMethod = fileInfoSetAttribute
#endif
foreign import ccall "g_file_info_set_attribute_boolean" g_file_info_set_attribute_boolean ::
Ptr FileInfo ->
CString ->
CInt ->
IO ()
fileInfoSetAttributeBoolean ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Bool
-> m ()
fileInfoSetAttributeBoolean :: a -> Text -> Bool -> m ()
fileInfoSetAttributeBoolean a
info Text
attribute Bool
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
let attrValue' :: CInt
attrValue' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
attrValue
Ptr FileInfo -> CString -> CInt -> IO ()
g_file_info_set_attribute_boolean Ptr FileInfo
info' CString
attribute' CInt
attrValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeBooleanMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeBooleanMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeBoolean
#endif
foreign import ccall "g_file_info_set_attribute_byte_string" g_file_info_set_attribute_byte_string ::
Ptr FileInfo ->
CString ->
CString ->
IO ()
fileInfoSetAttributeByteString ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> T.Text
-> m ()
fileInfoSetAttributeByteString :: a -> Text -> Text -> m ()
fileInfoSetAttributeByteString a
info Text
attribute Text
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CString
attrValue' <- Text -> IO CString
textToCString Text
attrValue
Ptr FileInfo -> CString -> CString -> IO ()
g_file_info_set_attribute_byte_string Ptr FileInfo
info' CString
attribute' CString
attrValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attrValue'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeByteStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeByteStringMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeByteString
#endif
foreign import ccall "g_file_info_set_attribute_int32" g_file_info_set_attribute_int32 ::
Ptr FileInfo ->
CString ->
Int32 ->
IO ()
fileInfoSetAttributeInt32 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Int32
-> m ()
fileInfoSetAttributeInt32 :: a -> Text -> Int32 -> m ()
fileInfoSetAttributeInt32 a
info Text
attribute Int32
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr FileInfo -> CString -> Int32 -> IO ()
g_file_info_set_attribute_int32 Ptr FileInfo
info' CString
attribute' Int32
attrValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeInt32MethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeInt32MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeInt32
#endif
foreign import ccall "g_file_info_set_attribute_int64" g_file_info_set_attribute_int64 ::
Ptr FileInfo ->
CString ->
Int64 ->
IO ()
fileInfoSetAttributeInt64 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Int64
-> m ()
fileInfoSetAttributeInt64 :: a -> Text -> Int64 -> m ()
fileInfoSetAttributeInt64 a
info Text
attribute Int64
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr FileInfo -> CString -> Int64 -> IO ()
g_file_info_set_attribute_int64 Ptr FileInfo
info' CString
attribute' Int64
attrValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeInt64MethodInfo
instance (signature ~ (T.Text -> Int64 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeInt64MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeInt64
#endif
foreign import ccall "g_file_info_set_attribute_mask" g_file_info_set_attribute_mask ::
Ptr FileInfo ->
Ptr Gio.FileAttributeMatcher.FileAttributeMatcher ->
IO ()
fileInfoSetAttributeMask ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Gio.FileAttributeMatcher.FileAttributeMatcher
-> m ()
fileInfoSetAttributeMask :: a -> FileAttributeMatcher -> m ()
fileInfoSetAttributeMask a
info FileAttributeMatcher
mask = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr FileAttributeMatcher
mask' <- FileAttributeMatcher -> IO (Ptr FileAttributeMatcher)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr FileAttributeMatcher
mask
Ptr FileInfo -> Ptr FileAttributeMatcher -> IO ()
g_file_info_set_attribute_mask Ptr FileInfo
info' Ptr FileAttributeMatcher
mask'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
FileAttributeMatcher -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr FileAttributeMatcher
mask
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeMaskMethodInfo
instance (signature ~ (Gio.FileAttributeMatcher.FileAttributeMatcher -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeMaskMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeMask
#endif
foreign import ccall "g_file_info_set_attribute_object" g_file_info_set_attribute_object ::
Ptr FileInfo ->
CString ->
Ptr GObject.Object.Object ->
IO ()
fileInfoSetAttributeObject ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a, GObject.Object.IsObject b) =>
a
-> T.Text
-> b
-> m ()
fileInfoSetAttributeObject :: a -> Text -> b -> m ()
fileInfoSetAttributeObject a
info Text
attribute b
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr Object
attrValue' <- b -> IO (Ptr Object)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
attrValue
Ptr FileInfo -> CString -> Ptr Object -> IO ()
g_file_info_set_attribute_object Ptr FileInfo
info' CString
attribute' Ptr Object
attrValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
attrValue
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeObjectMethodInfo
instance (signature ~ (T.Text -> b -> m ()), MonadIO m, IsFileInfo a, GObject.Object.IsObject b) => O.MethodInfo FileInfoSetAttributeObjectMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeObject
#endif
foreign import ccall "g_file_info_set_attribute_status" g_file_info_set_attribute_status ::
Ptr FileInfo ->
CString ->
CUInt ->
IO CInt
fileInfoSetAttributeStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Gio.Enums.FileAttributeStatus
-> m Bool
fileInfoSetAttributeStatus :: a -> Text -> FileAttributeStatus -> m Bool
fileInfoSetAttributeStatus a
info Text
attribute FileAttributeStatus
status = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
let status' :: CUInt
status' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (FileAttributeStatus -> Int) -> FileAttributeStatus -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileAttributeStatus -> Int
forall a. Enum a => a -> Int
fromEnum) FileAttributeStatus
status
CInt
result <- Ptr FileInfo -> CString -> CUInt -> IO CInt
g_file_info_set_attribute_status Ptr FileInfo
info' CString
attribute' CUInt
status'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStatusMethodInfo
instance (signature ~ (T.Text -> Gio.Enums.FileAttributeStatus -> m Bool), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeStatusMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeStatus
#endif
foreign import ccall "g_file_info_set_attribute_string" g_file_info_set_attribute_string ::
Ptr FileInfo ->
CString ->
CString ->
IO ()
fileInfoSetAttributeString ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> T.Text
-> m ()
fileInfoSetAttributeString :: a -> Text -> Text -> m ()
fileInfoSetAttributeString a
info Text
attribute Text
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
CString
attrValue' <- Text -> IO CString
textToCString Text
attrValue
Ptr FileInfo -> CString -> CString -> IO ()
g_file_info_set_attribute_string Ptr FileInfo
info' CString
attribute' CString
attrValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attrValue'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeStringMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeString
#endif
foreign import ccall "g_file_info_set_attribute_stringv" g_file_info_set_attribute_stringv ::
Ptr FileInfo ->
CString ->
Ptr CString ->
IO ()
fileInfoSetAttributeStringv ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> [T.Text]
-> m ()
fileInfoSetAttributeStringv :: a -> Text -> [Text] -> m ()
fileInfoSetAttributeStringv a
info Text
attribute [Text]
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr CString
attrValue' <- [Text] -> IO (Ptr CString)
packZeroTerminatedUTF8CArray [Text]
attrValue
Ptr FileInfo -> CString -> Ptr CString -> IO ()
g_file_info_set_attribute_stringv Ptr FileInfo
info' CString
attribute' Ptr CString
attrValue'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
(CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
attrValue'
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
attrValue'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStringvMethodInfo
instance (signature ~ (T.Text -> [T.Text] -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeStringvMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeStringv
#endif
foreign import ccall "g_file_info_set_attribute_uint32" g_file_info_set_attribute_uint32 ::
Ptr FileInfo ->
CString ->
Word32 ->
IO ()
fileInfoSetAttributeUint32 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Word32
-> m ()
fileInfoSetAttributeUint32 :: a -> Text -> Word32 -> m ()
fileInfoSetAttributeUint32 a
info Text
attribute Word32
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr FileInfo -> CString -> Word32 -> IO ()
g_file_info_set_attribute_uint32 Ptr FileInfo
info' CString
attribute' Word32
attrValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeUint32MethodInfo
instance (signature ~ (T.Text -> Word32 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeUint32MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeUint32
#endif
foreign import ccall "g_file_info_set_attribute_uint64" g_file_info_set_attribute_uint64 ::
Ptr FileInfo ->
CString ->
Word64 ->
IO ()
fileInfoSetAttributeUint64 ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> Word64
-> m ()
fileInfoSetAttributeUint64 :: a -> Text -> Word64 -> m ()
fileInfoSetAttributeUint64 a
info Text
attribute Word64
attrValue = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
attribute' <- Text -> IO CString
textToCString Text
attribute
Ptr FileInfo -> CString -> Word64 -> IO ()
g_file_info_set_attribute_uint64 Ptr FileInfo
info' CString
attribute' Word64
attrValue
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
attribute'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeUint64MethodInfo
instance (signature ~ (T.Text -> Word64 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetAttributeUint64MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeUint64
#endif
foreign import ccall "g_file_info_set_content_type" g_file_info_set_content_type ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoSetContentType ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ()
fileInfoSetContentType :: a -> Text -> m ()
fileInfoSetContentType a
info Text
contentType = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
contentType' <- Text -> IO CString
textToCString Text
contentType
Ptr FileInfo -> CString -> IO ()
g_file_info_set_content_type Ptr FileInfo
info' CString
contentType'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
contentType'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetContentTypeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetContentTypeMethodInfo a signature where
overloadedMethod = fileInfoSetContentType
#endif
foreign import ccall "g_file_info_set_display_name" g_file_info_set_display_name ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoSetDisplayName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ()
fileInfoSetDisplayName :: a -> Text -> m ()
fileInfoSetDisplayName a
info Text
displayName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
displayName' <- Text -> IO CString
textToCString Text
displayName
Ptr FileInfo -> CString -> IO ()
g_file_info_set_display_name Ptr FileInfo
info' CString
displayName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
displayName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetDisplayNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetDisplayNameMethodInfo a signature where
overloadedMethod = fileInfoSetDisplayName
#endif
foreign import ccall "g_file_info_set_edit_name" g_file_info_set_edit_name ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoSetEditName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ()
fileInfoSetEditName :: a -> Text -> m ()
fileInfoSetEditName a
info Text
editName = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
editName' <- Text -> IO CString
textToCString Text
editName
Ptr FileInfo -> CString -> IO ()
g_file_info_set_edit_name Ptr FileInfo
info' CString
editName'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
editName'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetEditNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetEditNameMethodInfo a signature where
overloadedMethod = fileInfoSetEditName
#endif
foreign import ccall "g_file_info_set_file_type" g_file_info_set_file_type ::
Ptr FileInfo ->
CUInt ->
IO ()
fileInfoSetFileType ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Gio.Enums.FileType
-> m ()
fileInfoSetFileType :: a -> FileType -> m ()
fileInfoSetFileType a
info FileType
type_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (FileType -> Int) -> FileType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. FileType -> Int
forall a. Enum a => a -> Int
fromEnum) FileType
type_
Ptr FileInfo -> CUInt -> IO ()
g_file_info_set_file_type Ptr FileInfo
info' CUInt
type_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetFileTypeMethodInfo
instance (signature ~ (Gio.Enums.FileType -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetFileTypeMethodInfo a signature where
overloadedMethod = fileInfoSetFileType
#endif
foreign import ccall "g_file_info_set_icon" g_file_info_set_icon ::
Ptr FileInfo ->
Ptr Gio.Icon.Icon ->
IO ()
fileInfoSetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) =>
a
-> b
-> m ()
fileInfoSetIcon :: a -> b -> m ()
fileInfoSetIcon a
info b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Icon
icon' <- b -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
icon
Ptr FileInfo -> Ptr Icon -> IO ()
g_file_info_set_icon Ptr FileInfo
info' Ptr Icon
icon'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
icon
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) => O.MethodInfo FileInfoSetIconMethodInfo a signature where
overloadedMethod = fileInfoSetIcon
#endif
foreign import ccall "g_file_info_set_is_hidden" g_file_info_set_is_hidden ::
Ptr FileInfo ->
CInt ->
IO ()
fileInfoSetIsHidden ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Bool
-> m ()
fileInfoSetIsHidden :: a -> Bool -> m ()
fileInfoSetIsHidden a
info Bool
isHidden = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let isHidden' :: CInt
isHidden' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isHidden
Ptr FileInfo -> CInt -> IO ()
g_file_info_set_is_hidden Ptr FileInfo
info' CInt
isHidden'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIsHiddenMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetIsHiddenMethodInfo a signature where
overloadedMethod = fileInfoSetIsHidden
#endif
foreign import ccall "g_file_info_set_is_symlink" g_file_info_set_is_symlink ::
Ptr FileInfo ->
CInt ->
IO ()
fileInfoSetIsSymlink ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Bool
-> m ()
fileInfoSetIsSymlink :: a -> Bool -> m ()
fileInfoSetIsSymlink a
info Bool
isSymlink = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let isSymlink' :: CInt
isSymlink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
isSymlink
Ptr FileInfo -> CInt -> IO ()
g_file_info_set_is_symlink Ptr FileInfo
info' CInt
isSymlink'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIsSymlinkMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetIsSymlinkMethodInfo a signature where
overloadedMethod = fileInfoSetIsSymlink
#endif
foreign import ccall "g_file_info_set_modification_date_time" g_file_info_set_modification_date_time ::
Ptr FileInfo ->
Ptr GLib.DateTime.DateTime ->
IO ()
fileInfoSetModificationDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> GLib.DateTime.DateTime
-> m ()
fileInfoSetModificationDateTime :: a -> DateTime -> m ()
fileInfoSetModificationDateTime a
info DateTime
mtime = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr DateTime
mtime' <- DateTime -> IO (Ptr DateTime)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DateTime
mtime
Ptr FileInfo -> Ptr DateTime -> IO ()
g_file_info_set_modification_date_time Ptr FileInfo
info' Ptr DateTime
mtime'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
DateTime -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr DateTime
mtime
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetModificationDateTimeMethodInfo
instance (signature ~ (GLib.DateTime.DateTime -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetModificationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoSetModificationDateTime
#endif
foreign import ccall "g_file_info_set_modification_time" g_file_info_set_modification_time ::
Ptr FileInfo ->
Ptr GLib.TimeVal.TimeVal ->
IO ()
{-# DEPRECATED fileInfoSetModificationTime ["(Since version 2.62)","Use 'GI.Gio.Objects.FileInfo.fileInfoSetModificationDateTime' instead, as"," t'GI.GLib.Structs.TimeVal.TimeVal' is deprecated due to the year 2038 problem."] #-}
fileInfoSetModificationTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> GLib.TimeVal.TimeVal
-> m ()
fileInfoSetModificationTime :: a -> TimeVal -> m ()
fileInfoSetModificationTime a
info TimeVal
mtime = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr TimeVal
mtime' <- TimeVal -> IO (Ptr TimeVal)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr TimeVal
mtime
Ptr FileInfo -> Ptr TimeVal -> IO ()
g_file_info_set_modification_time Ptr FileInfo
info' Ptr TimeVal
mtime'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
TimeVal -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr TimeVal
mtime
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetModificationTimeMethodInfo
instance (signature ~ (GLib.TimeVal.TimeVal -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetModificationTimeMethodInfo a signature where
overloadedMethod = fileInfoSetModificationTime
#endif
foreign import ccall "g_file_info_set_name" g_file_info_set_name ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoSetName ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> [Char]
-> m ()
fileInfoSetName :: a -> [Char] -> m ()
fileInfoSetName a
info [Char]
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
name' <- [Char] -> IO CString
stringToCString [Char]
name
Ptr FileInfo -> CString -> IO ()
g_file_info_set_name Ptr FileInfo
info' CString
name'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetNameMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetNameMethodInfo a signature where
overloadedMethod = fileInfoSetName
#endif
foreign import ccall "g_file_info_set_size" g_file_info_set_size ::
Ptr FileInfo ->
Int64 ->
IO ()
fileInfoSetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Int64
-> m ()
fileInfoSetSize :: a -> Int64 -> m ()
fileInfoSetSize a
info Int64
size = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr FileInfo -> Int64 -> IO ()
g_file_info_set_size Ptr FileInfo
info' Int64
size
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSizeMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetSizeMethodInfo a signature where
overloadedMethod = fileInfoSetSize
#endif
foreign import ccall "g_file_info_set_sort_order" g_file_info_set_sort_order ::
Ptr FileInfo ->
Int32 ->
IO ()
fileInfoSetSortOrder ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Int32
-> m ()
fileInfoSetSortOrder :: a -> Int32 -> m ()
fileInfoSetSortOrder a
info Int32
sortOrder = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr FileInfo -> Int32 -> IO ()
g_file_info_set_sort_order Ptr FileInfo
info' Int32
sortOrder
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSortOrderMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetSortOrderMethodInfo a signature where
overloadedMethod = fileInfoSetSortOrder
#endif
foreign import ccall "g_file_info_set_symbolic_icon" g_file_info_set_symbolic_icon ::
Ptr FileInfo ->
Ptr Gio.Icon.Icon ->
IO ()
fileInfoSetSymbolicIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) =>
a
-> b
-> m ()
fileInfoSetSymbolicIcon :: a -> b -> m ()
fileInfoSetSymbolicIcon a
info b
icon = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr Icon
icon' <- b -> IO (Ptr Icon)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
icon
Ptr FileInfo -> Ptr Icon -> IO ()
g_file_info_set_symbolic_icon Ptr FileInfo
info' Ptr Icon
icon'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
icon
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSymbolicIconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) => O.MethodInfo FileInfoSetSymbolicIconMethodInfo a signature where
overloadedMethod = fileInfoSetSymbolicIcon
#endif
foreign import ccall "g_file_info_set_symlink_target" g_file_info_set_symlink_target ::
Ptr FileInfo ->
CString ->
IO ()
fileInfoSetSymlinkTarget ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m ()
fileInfoSetSymlinkTarget :: a -> Text -> m ()
fileInfoSetSymlinkTarget a
info Text
symlinkTarget = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
CString
symlinkTarget' <- Text -> IO CString
textToCString Text
symlinkTarget
Ptr FileInfo -> CString -> IO ()
g_file_info_set_symlink_target Ptr FileInfo
info' CString
symlinkTarget'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
symlinkTarget'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSymlinkTargetMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoSetSymlinkTargetMethodInfo a signature where
overloadedMethod = fileInfoSetSymlinkTarget
#endif
foreign import ccall "g_file_info_unset_attribute_mask" g_file_info_unset_attribute_mask ::
Ptr FileInfo ->
IO ()
fileInfoUnsetAttributeMask ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m ()
fileInfoUnsetAttributeMask :: a -> m ()
fileInfoUnsetAttributeMask a
info = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr FileInfo
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr FileInfo -> IO ()
g_file_info_unset_attribute_mask Ptr FileInfo
info'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoUnsetAttributeMaskMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFileInfo a) => O.MethodInfo FileInfoUnsetAttributeMaskMethodInfo a signature where
overloadedMethod = fileInfoUnsetAttributeMask
#endif