{-# 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)
FileInfoGetAccessDateTimeMethodInfo ,
#endif
fileInfoGetAccessDateTime ,
#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)
FileInfoGetAttributeFilePathMethodInfo ,
#endif
fileInfoGetAttributeFilePath ,
#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)
FileInfoGetCreationDateTimeMethodInfo ,
#endif
fileInfoGetCreationDateTime ,
#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)
FileInfoSetAccessDateTimeMethodInfo ,
#endif
fileInfoSetAccessDateTime ,
#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)
FileInfoSetAttributeFilePathMethodInfo ,
#endif
fileInfoSetAttributeFilePath ,
#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)
FileInfoSetCreationDateTimeMethodInfo ,
#endif
fileInfoSetCreationDateTime ,
#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.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
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
#else
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
#endif
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
$c== :: FileInfo -> FileInfo -> Bool
== :: FileInfo -> FileInfo -> Bool
$c/= :: FileInfo -> FileInfo -> Bool
/= :: 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
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 :: (MIO.MonadIO m, IsFileInfo o) => o -> m FileInfo
toFileInfo :: forall (m :: * -> *) o.
(MonadIO m, IsFileInfo o) =>
o -> m FileInfo
toFileInfo = IO FileInfo -> m FileInfo
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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'
B.ManagedPtr.unsafeCastTo ManagedPtr FileInfo -> FileInfo
FileInfo
instance B.GValue.IsGValue (Maybe FileInfo) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_file_info_get_type
gvalueSet_ :: Ptr GValue -> Maybe FileInfo -> IO ()
gvalueSet_ Ptr GValue
gv Maybe FileInfo
P.Nothing = Ptr GValue -> Ptr FileInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr FileInfo
forall a. Ptr a
FP.nullPtr :: FP.Ptr FileInfo)
gvalueSet_ Ptr GValue
gv (P.Just FileInfo
obj) = FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr FileInfo
obj (Ptr GValue -> Ptr FileInfo -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe FileInfo)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr FileInfo)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr FileInfo)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject FileInfo ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveFileInfoMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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 "getAccessDateTime" o = FileInfoGetAccessDateTimeMethodInfo
ResolveFileInfoMethod "getAttributeAsString" o = FileInfoGetAttributeAsStringMethodInfo
ResolveFileInfoMethod "getAttributeBoolean" o = FileInfoGetAttributeBooleanMethodInfo
ResolveFileInfoMethod "getAttributeByteString" o = FileInfoGetAttributeByteStringMethodInfo
ResolveFileInfoMethod "getAttributeData" o = FileInfoGetAttributeDataMethodInfo
ResolveFileInfoMethod "getAttributeFilePath" o = FileInfoGetAttributeFilePathMethodInfo
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 "getCreationDateTime" o = FileInfoGetCreationDateTimeMethodInfo
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 "setAccessDateTime" o = FileInfoSetAccessDateTimeMethodInfo
ResolveFileInfoMethod "setAttribute" o = FileInfoSetAttributeMethodInfo
ResolveFileInfoMethod "setAttributeBoolean" o = FileInfoSetAttributeBooleanMethodInfo
ResolveFileInfoMethod "setAttributeByteString" o = FileInfoSetAttributeByteStringMethodInfo
ResolveFileInfoMethod "setAttributeFilePath" o = FileInfoSetAttributeFilePathMethodInfo
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 "setCreationDateTime" o = FileInfoSetCreationDateTimeMethodInfo
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.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveFileInfoMethod t FileInfo, O.OverloadedMethod info FileInfo p, R.HasField t FileInfo p) => R.HasField t FileInfo p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveFileInfoMethod t FileInfo, O.OverloadedMethodInfo info FileInfo) => OL.IsLabel t (O.MethodProxy info FileInfo) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList FileInfo
type instance O.AttributeList FileInfo = FileInfoAttributeList
type FileInfoAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList FileInfo = FileInfoSignalList
type FileInfoSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_file_info_new" g_file_info_new ::
IO (Ptr FileInfo)
fileInfoNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m FileInfo
fileInfoNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m FileInfo
fileInfoNew = IO FileInfo -> m FileInfo
forall a. IO a -> m a
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
result <- IO (Ptr FileInfo)
g_file_info_new
checkUnexpectedReturnNULL "fileInfoNew" result
result' <- (wrapObject FileInfo) result
return 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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m ()
fileInfoClearStatus a
info = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
g_file_info_clear_status info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoClearStatusMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoClearStatusMethodInfo a signature where
overloadedMethod = fileInfoClearStatus
instance O.OverloadedMethodInfo FileInfoClearStatusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoClearStatus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileInfo a, IsFileInfo b) =>
a -> b -> m ()
fileInfoCopyInto a
srcInfo b
destInfo = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
srcInfo' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srcInfo
destInfo' <- unsafeManagedPtrCastPtr destInfo
g_file_info_copy_into srcInfo' destInfo'
touchManagedPtr srcInfo
touchManagedPtr destInfo
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoCopyIntoMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, IsFileInfo b) => O.OverloadedMethod FileInfoCopyIntoMethodInfo a signature where
overloadedMethod = fileInfoCopyInto
instance O.OverloadedMethodInfo FileInfoCopyIntoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoCopyInto",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m FileInfo
fileInfoDup a
other = IO FileInfo -> m FileInfo
forall a. IO a -> m a
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
other' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
other
result <- g_file_info_dup other'
checkUnexpectedReturnNULL "fileInfoDup" result
result' <- (wrapObject FileInfo) result
touchManagedPtr other
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoDupMethodInfo
instance (signature ~ (m FileInfo), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoDupMethodInfo a signature where
overloadedMethod = fileInfoDup
instance O.OverloadedMethodInfo FileInfoDupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoDup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoDup"
})
#endif
foreign import ccall "g_file_info_get_access_date_time" g_file_info_get_access_date_time ::
Ptr FileInfo ->
IO (Ptr GLib.DateTime.DateTime)
fileInfoGetAccessDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m (Maybe GLib.DateTime.DateTime)
fileInfoGetAccessDateTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe DateTime)
fileInfoGetAccessDateTime a
info = IO (Maybe DateTime) -> m (Maybe DateTime)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_access_date_time info'
maybeResult <- convertIfNonNull result $ \Ptr DateTime
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAccessDateTimeMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAccessDateTimeMethodInfo a signature where
overloadedMethod = fileInfoGetAccessDateTime
instance O.OverloadedMethodInfo FileInfoGetAccessDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAccessDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoGetAccessDateTime"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe Text)
fileInfoGetAttributeAsString a
info Text
attribute = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_as_string info' attribute'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
freeMem result'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeAsStringMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeAsStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeAsString
instance O.OverloadedMethodInfo FileInfoGetAttributeAsStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeAsString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Bool
fileInfoGetAttributeBoolean a
info Text
attribute = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_boolean info' attribute'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
freeMem attribute'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeBooleanMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeBooleanMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeBoolean
instance O.OverloadedMethodInfo FileInfoGetAttributeBooleanMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe T.Text)
fileInfoGetAttributeByteString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe Text)
fileInfoGetAttributeByteString a
info Text
attribute = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_byte_string info' attribute'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeByteStringMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeByteStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeByteString
instance O.OverloadedMethodInfo FileInfoGetAttributeByteStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeByteString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> Text -> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
fileInfoGetAttributeData a
info Text
attribute = IO (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
-> m (Bool, FileAttributeType, Ptr (), FileAttributeStatus)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
type_ <- allocMem :: IO (Ptr CUInt)
valuePp <- callocMem :: IO (Ptr (Ptr ()))
status <- allocMem :: IO (Ptr CUInt)
result <- g_file_info_get_attribute_data info' attribute' type_ valuePp status
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
type_' <- peek type_
let 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_'
valuePp' <- peek valuePp
status' <- peek status
let 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'
touchManagedPtr info
freeMem attribute'
freeMem type_
freeMem valuePp
freeMem status
return (result', type_'', valuePp', 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.OverloadedMethod FileInfoGetAttributeDataMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeData
instance O.OverloadedMethodInfo FileInfoGetAttributeDataMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeData",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoGetAttributeData"
})
#endif
foreign import ccall "g_file_info_get_attribute_file_path" g_file_info_get_attribute_file_path ::
Ptr FileInfo ->
CString ->
IO CString
fileInfoGetAttributeFilePath ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> m (Maybe [Char])
fileInfoGetAttributeFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe String)
fileInfoGetAttributeFilePath a
info Text
attribute = IO (Maybe String) -> m (Maybe String)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_file_path info' attribute'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeFilePathMethodInfo
instance (signature ~ (T.Text -> m (Maybe [Char])), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeFilePathMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeFilePath
instance O.OverloadedMethodInfo FileInfoGetAttributeFilePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeFilePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoGetAttributeFilePath"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Int32
fileInfoGetAttributeInt32 a
info Text
attribute = IO Int32 -> m Int32
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_int32 info' attribute'
touchManagedPtr info
freeMem attribute'
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeInt32MethodInfo
instance (signature ~ (T.Text -> m Int32), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeInt32MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeInt32
instance O.OverloadedMethodInfo FileInfoGetAttributeInt32MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeInt32",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Int64
fileInfoGetAttributeInt64 a
info Text
attribute = IO Int64 -> m Int64
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_int64 info' attribute'
touchManagedPtr info
freeMem attribute'
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeInt64MethodInfo
instance (signature ~ (T.Text -> m Int64), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeInt64MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeInt64
instance O.OverloadedMethodInfo FileInfoGetAttributeInt64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe GObject.Object.Object)
fileInfoGetAttributeObject :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe Object)
fileInfoGetAttributeObject a
info Text
attribute = IO (Maybe Object) -> m (Maybe Object)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Object) -> m (Maybe Object))
-> IO (Maybe Object) -> m (Maybe Object)
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_object info' attribute'
maybeResult <- convertIfNonNull result $ \Ptr Object
result' -> do
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'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeObjectMethodInfo
instance (signature ~ (T.Text -> m (Maybe GObject.Object.Object)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeObjectMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeObject
instance O.OverloadedMethodInfo FileInfoGetAttributeObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m FileAttributeStatus
fileInfoGetAttributeStatus a
info Text
attribute = IO FileAttributeStatus -> m FileAttributeStatus
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_status info' attribute'
let 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
touchManagedPtr info
freeMem attribute'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStatusMethodInfo
instance (signature ~ (T.Text -> m Gio.Enums.FileAttributeStatus), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeStatusMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeStatus
instance O.OverloadedMethodInfo FileInfoGetAttributeStatusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeStatus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe T.Text)
fileInfoGetAttributeString :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe Text)
fileInfoGetAttributeString a
info Text
attribute = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_string info' attribute'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStringMethodInfo
instance (signature ~ (T.Text -> m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeStringMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeString
instance O.OverloadedMethodInfo FileInfoGetAttributeStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe [T.Text])
fileInfoGetAttributeStringv :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m (Maybe [Text])
fileInfoGetAttributeStringv a
info Text
attribute = IO (Maybe [Text]) -> m (Maybe [Text])
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_stringv info' attribute'
maybeResult <- convertIfNonNull result $ \Ptr CString
result' -> do
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
return result''
touchManagedPtr info
freeMem attribute'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeStringvMethodInfo
instance (signature ~ (T.Text -> m (Maybe [T.Text])), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeStringvMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeStringv
instance O.OverloadedMethodInfo FileInfoGetAttributeStringvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeStringv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m FileAttributeType
fileInfoGetAttributeType a
info Text
attribute = IO FileAttributeType -> m FileAttributeType
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_type info' attribute'
let 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
touchManagedPtr info
freeMem attribute'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeTypeMethodInfo
instance (signature ~ (T.Text -> m Gio.Enums.FileAttributeType), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeTypeMethodInfo a signature where
overloadedMethod = fileInfoGetAttributeType
instance O.OverloadedMethodInfo FileInfoGetAttributeTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Word32
fileInfoGetAttributeUint32 a
info Text
attribute = IO Word32 -> m Word32
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_uint32 info' attribute'
touchManagedPtr info
freeMem attribute'
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeUint32MethodInfo
instance (signature ~ (T.Text -> m Word32), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeUint32MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeUint32
instance O.OverloadedMethodInfo FileInfoGetAttributeUint32MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeUint32",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Word64
fileInfoGetAttributeUint64 a
info Text
attribute = IO Word64 -> m Word64
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_get_attribute_uint64 info' attribute'
touchManagedPtr info
freeMem attribute'
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetAttributeUint64MethodInfo
instance (signature ~ (T.Text -> m Word64), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetAttributeUint64MethodInfo a signature where
overloadedMethod = fileInfoGetAttributeUint64
instance O.OverloadedMethodInfo FileInfoGetAttributeUint64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetAttributeUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe T.Text)
fileInfoGetContentType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe Text)
fileInfoGetContentType a
info = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_content_type info'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetContentTypeMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetContentTypeMethodInfo a signature where
overloadedMethod = fileInfoGetContentType
instance O.OverloadedMethodInfo FileInfoGetContentTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetContentType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoGetContentType"
})
#endif
foreign import ccall "g_file_info_get_creation_date_time" g_file_info_get_creation_date_time ::
Ptr FileInfo ->
IO (Ptr GLib.DateTime.DateTime)
fileInfoGetCreationDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> m (Maybe GLib.DateTime.DateTime)
fileInfoGetCreationDateTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe DateTime)
fileInfoGetCreationDateTime a
info = IO (Maybe DateTime) -> m (Maybe DateTime)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_creation_date_time info'
maybeResult <- convertIfNonNull result $ \Ptr DateTime
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetCreationDateTimeMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetCreationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoGetCreationDateTime
instance O.OverloadedMethodInfo FileInfoGetCreationDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetCreationDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoGetCreationDateTime"
})
#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 (Maybe GLib.DateTime.DateTime)
fileInfoGetDeletionDate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe DateTime)
fileInfoGetDeletionDate a
info = IO (Maybe DateTime) -> m (Maybe DateTime)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_deletion_date info'
maybeResult <- convertIfNonNull result $ \Ptr DateTime
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetDeletionDateMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetDeletionDateMethodInfo a signature where
overloadedMethod = fileInfoGetDeletionDate
instance O.OverloadedMethodInfo FileInfoGetDeletionDateMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetDeletionDate",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Text
fileInfoGetDisplayName a
info = IO Text -> m Text
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_display_name info'
checkUnexpectedReturnNULL "fileInfoGetDisplayName" result
result' <- cstringToText result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetDisplayNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetDisplayNameMethodInfo a signature where
overloadedMethod = fileInfoGetDisplayName
instance O.OverloadedMethodInfo FileInfoGetDisplayNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetDisplayName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Text
fileInfoGetEditName a
info = IO Text -> m Text
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_edit_name info'
checkUnexpectedReturnNULL "fileInfoGetEditName" result
result' <- cstringToText result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetEditNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetEditNameMethodInfo a signature where
overloadedMethod = fileInfoGetEditName
instance O.OverloadedMethodInfo FileInfoGetEditNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetEditName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe T.Text)
fileInfoGetEtag :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe Text)
fileInfoGetEtag a
info = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_etag info'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetEtagMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetEtagMethodInfo a signature where
overloadedMethod = fileInfoGetEtag
instance O.OverloadedMethodInfo FileInfoGetEtagMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetEtag",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m FileType
fileInfoGetFileType a
info = IO FileType -> m FileType
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_file_type info'
let 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
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetFileTypeMethodInfo
instance (signature ~ (m Gio.Enums.FileType), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetFileTypeMethodInfo a signature where
overloadedMethod = fileInfoGetFileType
instance O.OverloadedMethodInfo FileInfoGetFileTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetFileType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe Gio.Icon.Icon)
fileInfoGetIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe Icon)
fileInfoGetIcon a
info = IO (Maybe Icon) -> m (Maybe Icon)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Icon) -> m (Maybe Icon))
-> IO (Maybe Icon) -> m (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_icon info'
maybeResult <- convertIfNonNull result $ \Ptr Icon
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIconMethodInfo
instance (signature ~ (m (Maybe Gio.Icon.Icon)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetIconMethodInfo a signature where
overloadedMethod = fileInfoGetIcon
instance O.OverloadedMethodInfo FileInfoGetIconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Bool
fileInfoGetIsBackup a
info = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_is_backup info'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsBackupMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetIsBackupMethodInfo a signature where
overloadedMethod = fileInfoGetIsBackup
instance O.OverloadedMethodInfo FileInfoGetIsBackupMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetIsBackup",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Bool
fileInfoGetIsHidden a
info = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_is_hidden info'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsHiddenMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetIsHiddenMethodInfo a signature where
overloadedMethod = fileInfoGetIsHidden
instance O.OverloadedMethodInfo FileInfoGetIsHiddenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetIsHidden",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Bool
fileInfoGetIsSymlink a
info = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_is_symlink info'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetIsSymlinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetIsSymlinkMethodInfo a signature where
overloadedMethod = fileInfoGetIsSymlink
instance O.OverloadedMethodInfo FileInfoGetIsSymlinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetIsSymlink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe DateTime)
fileInfoGetModificationDateTime a
info = IO (Maybe DateTime) -> m (Maybe DateTime)
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_modification_date_time info'
maybeResult <- convertIfNonNull result $ \Ptr DateTime
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetModificationDateTimeMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetModificationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoGetModificationDateTime
instance O.OverloadedMethodInfo FileInfoGetModificationDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetModificationDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m TimeVal
fileInfoGetModificationTime a
info = IO TimeVal -> m TimeVal
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result_ <- SP.callocBytes 16 :: IO (Ptr GLib.TimeVal.TimeVal)
g_file_info_get_modification_time info' result_
result_' <- (wrapPtr GLib.TimeVal.TimeVal) result_
touchManagedPtr info
return result_'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetModificationTimeMethodInfo
instance (signature ~ (m (GLib.TimeVal.TimeVal)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetModificationTimeMethodInfo a signature where
overloadedMethod = fileInfoGetModificationTime
instance O.OverloadedMethodInfo FileInfoGetModificationTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetModificationTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m String
fileInfoGetName a
info = IO String -> m String
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO String -> m String) -> IO String -> m String
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_name info'
checkUnexpectedReturnNULL "fileInfoGetName" result
result' <- cstringToString result
touchManagedPtr info
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoGetNameMethodInfo
instance (signature ~ (m [Char]), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetNameMethodInfo a signature where
overloadedMethod = fileInfoGetName
instance O.OverloadedMethodInfo FileInfoGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Int64
fileInfoGetSize a
info = IO Int64 -> m Int64
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_size info'
touchManagedPtr info
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSizeMethodInfo
instance (signature ~ (m Int64), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetSizeMethodInfo a signature where
overloadedMethod = fileInfoGetSize
instance O.OverloadedMethodInfo FileInfoGetSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m Int32
fileInfoGetSortOrder a
info = IO Int32 -> m Int32
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_sort_order info'
touchManagedPtr info
return result
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSortOrderMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetSortOrderMethodInfo a signature where
overloadedMethod = fileInfoGetSortOrder
instance O.OverloadedMethodInfo FileInfoGetSortOrderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetSortOrder",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe Gio.Icon.Icon)
fileInfoGetSymbolicIcon :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe Icon)
fileInfoGetSymbolicIcon a
info = IO (Maybe Icon) -> m (Maybe Icon)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Icon) -> m (Maybe Icon))
-> IO (Maybe Icon) -> m (Maybe Icon)
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_symbolic_icon info'
maybeResult <- convertIfNonNull result $ \Ptr Icon
result' -> do
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'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSymbolicIconMethodInfo
instance (signature ~ (m (Maybe Gio.Icon.Icon)), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetSymbolicIconMethodInfo a signature where
overloadedMethod = fileInfoGetSymbolicIcon
instance O.OverloadedMethodInfo FileInfoGetSymbolicIconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetSymbolicIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 (Maybe [Char])
fileInfoGetSymlinkTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m (Maybe String)
fileInfoGetSymlinkTarget a
info = IO (Maybe String) -> m (Maybe String)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe String) -> m (Maybe String))
-> IO (Maybe String) -> m (Maybe String)
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
result <- g_file_info_get_symlink_target info'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO String
CString -> IO String
cstringToString CString
result'
return result''
touchManagedPtr info
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoGetSymlinkTargetMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoGetSymlinkTargetMethodInfo a signature where
overloadedMethod = fileInfoGetSymlinkTarget
instance O.OverloadedMethodInfo FileInfoGetSymlinkTargetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoGetSymlinkTarget",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Bool
fileInfoHasAttribute a
info Text
attribute = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
result <- g_file_info_has_attribute info' attribute'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
freeMem attribute'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoHasAttributeMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoHasAttributeMethodInfo a signature where
overloadedMethod = fileInfoHasAttribute
instance O.OverloadedMethodInfo FileInfoHasAttributeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoHasAttribute",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m Bool
fileInfoHasNamespace a
info Text
nameSpace = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
nameSpace' <- textToCString nameSpace
result <- g_file_info_has_namespace info' nameSpace'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
freeMem nameSpace'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoHasNamespaceMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoHasNamespaceMethodInfo a signature where
overloadedMethod = fileInfoHasNamespace
instance O.OverloadedMethodInfo FileInfoHasNamespaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoHasNamespace",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Maybe Text -> m (Maybe [Text])
fileInfoListAttributes a
info Maybe Text
nameSpace = IO (Maybe [Text]) -> m (Maybe [Text])
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
maybeNameSpace <- case nameSpace of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jNameSpace -> do
jNameSpace' <- Text -> IO CString
textToCString Text
jNameSpace
return jNameSpace'
result <- g_file_info_list_attributes info' maybeNameSpace
maybeResult <- convertIfNonNull result $ \Ptr CString
result' -> do
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
mapZeroTerminatedCArray freeMem result'
freeMem result'
return result''
touchManagedPtr info
freeMem maybeNameSpace
return maybeResult
#if defined(ENABLE_OVERLOADING)
data FileInfoListAttributesMethodInfo
instance (signature ~ (Maybe (T.Text) -> m (Maybe [T.Text])), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoListAttributesMethodInfo a signature where
overloadedMethod = fileInfoListAttributes
instance O.OverloadedMethodInfo FileInfoListAttributesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoListAttributes",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m ()
fileInfoRemoveAttribute a
info Text
attribute = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
g_file_info_remove_attribute info' attribute'
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoRemoveAttributeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoRemoveAttributeMethodInfo a signature where
overloadedMethod = fileInfoRemoveAttribute
instance O.OverloadedMethodInfo FileInfoRemoveAttributeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoRemoveAttribute",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoRemoveAttribute"
})
#endif
foreign import ccall "g_file_info_set_access_date_time" g_file_info_set_access_date_time ::
Ptr FileInfo ->
Ptr GLib.DateTime.DateTime ->
IO ()
fileInfoSetAccessDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> GLib.DateTime.DateTime
-> m ()
fileInfoSetAccessDateTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> DateTime -> m ()
fileInfoSetAccessDateTime a
info DateTime
atime = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
atime' <- unsafeManagedPtrGetPtr atime
g_file_info_set_access_date_time info' atime'
touchManagedPtr info
touchManagedPtr atime
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAccessDateTimeMethodInfo
instance (signature ~ (GLib.DateTime.DateTime -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAccessDateTimeMethodInfo a signature where
overloadedMethod = fileInfoSetAccessDateTime
instance O.OverloadedMethodInfo FileInfoSetAccessDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAccessDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoSetAccessDateTime"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> FileAttributeType -> Ptr () -> m ()
fileInfoSetAttribute a
info Text
attribute FileAttributeType
type_ Ptr ()
valueP = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
let 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_
g_file_info_set_attribute info' attribute' type_' valueP
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeMethodInfo
instance (signature ~ (T.Text -> Gio.Enums.FileAttributeType -> Ptr () -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeMethodInfo a signature where
overloadedMethod = fileInfoSetAttribute
instance O.OverloadedMethodInfo FileInfoSetAttributeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttribute",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Bool -> m ()
fileInfoSetAttributeBoolean a
info Text
attribute Bool
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
let attrValue' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
attrValue
g_file_info_set_attribute_boolean info' attribute' attrValue'
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeBooleanMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeBooleanMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeBoolean
instance O.OverloadedMethodInfo FileInfoSetAttributeBooleanMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeBoolean",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Text -> m ()
fileInfoSetAttributeByteString a
info Text
attribute Text
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
attrValue' <- textToCString attrValue
g_file_info_set_attribute_byte_string info' attribute' attrValue'
touchManagedPtr info
freeMem attribute'
freeMem attrValue'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeByteStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeByteStringMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeByteString
instance O.OverloadedMethodInfo FileInfoSetAttributeByteStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeByteString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoSetAttributeByteString"
})
#endif
foreign import ccall "g_file_info_set_attribute_file_path" g_file_info_set_attribute_file_path ::
Ptr FileInfo ->
CString ->
CString ->
IO ()
fileInfoSetAttributeFilePath ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> T.Text
-> [Char]
-> m ()
fileInfoSetAttributeFilePath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> String -> m ()
fileInfoSetAttributeFilePath a
info Text
attribute String
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
attrValue' <- stringToCString attrValue
g_file_info_set_attribute_file_path info' attribute' attrValue'
touchManagedPtr info
freeMem attribute'
freeMem attrValue'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeFilePathMethodInfo
instance (signature ~ (T.Text -> [Char] -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeFilePathMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeFilePath
instance O.OverloadedMethodInfo FileInfoSetAttributeFilePathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeFilePath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoSetAttributeFilePath"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Int32 -> m ()
fileInfoSetAttributeInt32 a
info Text
attribute Int32
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
g_file_info_set_attribute_int32 info' attribute' attrValue
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeInt32MethodInfo
instance (signature ~ (T.Text -> Int32 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeInt32MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeInt32
instance O.OverloadedMethodInfo FileInfoSetAttributeInt32MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeInt32",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Int64 -> m ()
fileInfoSetAttributeInt64 a
info Text
attribute Int64
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
g_file_info_set_attribute_int64 info' attribute' attrValue
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeInt64MethodInfo
instance (signature ~ (T.Text -> Int64 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeInt64MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeInt64
instance O.OverloadedMethodInfo FileInfoSetAttributeInt64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeInt64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> FileAttributeMatcher -> m ()
fileInfoSetAttributeMask a
info FileAttributeMatcher
mask = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
mask' <- unsafeManagedPtrGetPtr mask
g_file_info_set_attribute_mask info' mask'
touchManagedPtr info
touchManagedPtr mask
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeMaskMethodInfo
instance (signature ~ (Gio.FileAttributeMatcher.FileAttributeMatcher -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeMaskMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeMask
instance O.OverloadedMethodInfo FileInfoSetAttributeMaskMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeMask",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileInfo a, IsObject b) =>
a -> Text -> b -> m ()
fileInfoSetAttributeObject a
info Text
attribute b
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
attrValue' <- unsafeManagedPtrCastPtr attrValue
g_file_info_set_attribute_object info' attribute' attrValue'
touchManagedPtr info
touchManagedPtr attrValue
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeObjectMethodInfo
instance (signature ~ (T.Text -> b -> m ()), MonadIO m, IsFileInfo a, GObject.Object.IsObject b) => O.OverloadedMethod FileInfoSetAttributeObjectMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeObject
instance O.OverloadedMethodInfo FileInfoSetAttributeObjectMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeObject",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> FileAttributeStatus -> m Bool
fileInfoSetAttributeStatus a
info Text
attribute FileAttributeStatus
status = IO Bool -> m Bool
forall a. IO a -> m a
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
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
let 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
result <- g_file_info_set_attribute_status info' attribute' status'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr info
freeMem attribute'
return result'
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStatusMethodInfo
instance (signature ~ (T.Text -> Gio.Enums.FileAttributeStatus -> m Bool), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeStatusMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeStatus
instance O.OverloadedMethodInfo FileInfoSetAttributeStatusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeStatus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Text -> m ()
fileInfoSetAttributeString a
info Text
attribute Text
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
attrValue' <- textToCString attrValue
g_file_info_set_attribute_string info' attribute' attrValue'
touchManagedPtr info
freeMem attribute'
freeMem attrValue'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStringMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeStringMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeString
instance O.OverloadedMethodInfo FileInfoSetAttributeStringMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeString",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> [Text] -> m ()
fileInfoSetAttributeStringv a
info Text
attribute [Text]
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
attrValue' <- packZeroTerminatedUTF8CArray attrValue
g_file_info_set_attribute_stringv info' attribute' attrValue'
touchManagedPtr info
freeMem attribute'
mapZeroTerminatedCArray freeMem attrValue'
freeMem attrValue'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeStringvMethodInfo
instance (signature ~ (T.Text -> [T.Text] -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeStringvMethodInfo a signature where
overloadedMethod = fileInfoSetAttributeStringv
instance O.OverloadedMethodInfo FileInfoSetAttributeStringvMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeStringv",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Word32 -> m ()
fileInfoSetAttributeUint32 a
info Text
attribute Word32
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
g_file_info_set_attribute_uint32 info' attribute' attrValue
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeUint32MethodInfo
instance (signature ~ (T.Text -> Word32 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeUint32MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeUint32
instance O.OverloadedMethodInfo FileInfoSetAttributeUint32MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeUint32",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> Word64 -> m ()
fileInfoSetAttributeUint64 a
info Text
attribute Word64
attrValue = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
attribute' <- textToCString attribute
g_file_info_set_attribute_uint64 info' attribute' attrValue
touchManagedPtr info
freeMem attribute'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetAttributeUint64MethodInfo
instance (signature ~ (T.Text -> Word64 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetAttributeUint64MethodInfo a signature where
overloadedMethod = fileInfoSetAttributeUint64
instance O.OverloadedMethodInfo FileInfoSetAttributeUint64MethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetAttributeUint64",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m ()
fileInfoSetContentType a
info Text
contentType = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
contentType' <- textToCString contentType
g_file_info_set_content_type info' contentType'
touchManagedPtr info
freeMem contentType'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetContentTypeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetContentTypeMethodInfo a signature where
overloadedMethod = fileInfoSetContentType
instance O.OverloadedMethodInfo FileInfoSetContentTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetContentType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoSetContentType"
})
#endif
foreign import ccall "g_file_info_set_creation_date_time" g_file_info_set_creation_date_time ::
Ptr FileInfo ->
Ptr GLib.DateTime.DateTime ->
IO ()
fileInfoSetCreationDateTime ::
(B.CallStack.HasCallStack, MonadIO m, IsFileInfo a) =>
a
-> GLib.DateTime.DateTime
-> m ()
fileInfoSetCreationDateTime :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> DateTime -> m ()
fileInfoSetCreationDateTime a
info DateTime
creationTime = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
creationTime' <- unsafeManagedPtrGetPtr creationTime
g_file_info_set_creation_date_time info' creationTime'
touchManagedPtr info
touchManagedPtr creationTime
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetCreationDateTimeMethodInfo
instance (signature ~ (GLib.DateTime.DateTime -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetCreationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoSetCreationDateTime
instance O.OverloadedMethodInfo FileInfoSetCreationDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetCreationDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoSetCreationDateTime"
})
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m ()
fileInfoSetDisplayName a
info Text
displayName = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
displayName' <- textToCString displayName
g_file_info_set_display_name info' displayName'
touchManagedPtr info
freeMem displayName'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetDisplayNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetDisplayNameMethodInfo a signature where
overloadedMethod = fileInfoSetDisplayName
instance O.OverloadedMethodInfo FileInfoSetDisplayNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetDisplayName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Text -> m ()
fileInfoSetEditName a
info Text
editName = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
editName' <- textToCString editName
g_file_info_set_edit_name info' editName'
touchManagedPtr info
freeMem editName'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetEditNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetEditNameMethodInfo a signature where
overloadedMethod = fileInfoSetEditName
instance O.OverloadedMethodInfo FileInfoSetEditNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetEditName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> FileType -> m ()
fileInfoSetFileType a
info FileType
type_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let 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_
g_file_info_set_file_type info' type_'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetFileTypeMethodInfo
instance (signature ~ (Gio.Enums.FileType -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetFileTypeMethodInfo a signature where
overloadedMethod = fileInfoSetFileType
instance O.OverloadedMethodInfo FileInfoSetFileTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetFileType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) =>
a -> b -> m ()
fileInfoSetIcon a
info b
icon = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
icon' <- unsafeManagedPtrCastPtr icon
g_file_info_set_icon info' icon'
touchManagedPtr info
touchManagedPtr icon
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) => O.OverloadedMethod FileInfoSetIconMethodInfo a signature where
overloadedMethod = fileInfoSetIcon
instance O.OverloadedMethodInfo FileInfoSetIconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Bool -> m ()
fileInfoSetIsHidden a
info Bool
isHidden = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let isHidden' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
isHidden
g_file_info_set_is_hidden info' isHidden'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIsHiddenMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetIsHiddenMethodInfo a signature where
overloadedMethod = fileInfoSetIsHidden
instance O.OverloadedMethodInfo FileInfoSetIsHiddenMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetIsHidden",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Bool -> m ()
fileInfoSetIsSymlink a
info Bool
isSymlink = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
let isSymlink' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.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
P.fromEnum) Bool
isSymlink
g_file_info_set_is_symlink info' isSymlink'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetIsSymlinkMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetIsSymlinkMethodInfo a signature where
overloadedMethod = fileInfoSetIsSymlink
instance O.OverloadedMethodInfo FileInfoSetIsSymlinkMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetIsSymlink",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> DateTime -> m ()
fileInfoSetModificationDateTime a
info DateTime
mtime = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
mtime' <- unsafeManagedPtrGetPtr mtime
g_file_info_set_modification_date_time info' mtime'
touchManagedPtr info
touchManagedPtr mtime
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetModificationDateTimeMethodInfo
instance (signature ~ (GLib.DateTime.DateTime -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetModificationDateTimeMethodInfo a signature where
overloadedMethod = fileInfoSetModificationDateTime
instance O.OverloadedMethodInfo FileInfoSetModificationDateTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetModificationDateTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> TimeVal -> m ()
fileInfoSetModificationTime a
info TimeVal
mtime = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
mtime' <- unsafeManagedPtrGetPtr mtime
g_file_info_set_modification_time info' mtime'
touchManagedPtr info
touchManagedPtr mtime
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetModificationTimeMethodInfo
instance (signature ~ (GLib.TimeVal.TimeVal -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetModificationTimeMethodInfo a signature where
overloadedMethod = fileInfoSetModificationTime
instance O.OverloadedMethodInfo FileInfoSetModificationTimeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetModificationTime",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> String -> m ()
fileInfoSetName a
info String
name = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
name' <- stringToCString name
g_file_info_set_name info' name'
touchManagedPtr info
freeMem name'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetNameMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetNameMethodInfo a signature where
overloadedMethod = fileInfoSetName
instance O.OverloadedMethodInfo FileInfoSetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Int64 -> m ()
fileInfoSetSize a
info Int64
size = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
g_file_info_set_size info' size
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSizeMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetSizeMethodInfo a signature where
overloadedMethod = fileInfoSetSize
instance O.OverloadedMethodInfo FileInfoSetSizeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetSize",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> Int32 -> m ()
fileInfoSetSortOrder a
info Int32
sortOrder = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
g_file_info_set_sort_order info' sortOrder
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSortOrderMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetSortOrderMethodInfo a signature where
overloadedMethod = fileInfoSetSortOrder
instance O.OverloadedMethodInfo FileInfoSetSortOrderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetSortOrder",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsFileInfo a, IsIcon b) =>
a -> b -> m ()
fileInfoSetSymbolicIcon a
info b
icon = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
icon' <- unsafeManagedPtrCastPtr icon
g_file_info_set_symbolic_icon info' icon'
touchManagedPtr info
touchManagedPtr icon
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSymbolicIconMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsFileInfo a, Gio.Icon.IsIcon b) => O.OverloadedMethod FileInfoSetSymbolicIconMethodInfo a signature where
overloadedMethod = fileInfoSetSymbolicIcon
instance O.OverloadedMethodInfo FileInfoSetSymbolicIconMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetSymbolicIcon",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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
-> [Char]
-> m ()
fileInfoSetSymlinkTarget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> String -> m ()
fileInfoSetSymlinkTarget a
info String
symlinkTarget = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
symlinkTarget' <- stringToCString symlinkTarget
g_file_info_set_symlink_target info' symlinkTarget'
touchManagedPtr info
freeMem symlinkTarget'
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoSetSymlinkTargetMethodInfo
instance (signature ~ ([Char] -> m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoSetSymlinkTargetMethodInfo a signature where
overloadedMethod = fileInfoSetSymlinkTarget
instance O.OverloadedMethodInfo FileInfoSetSymlinkTargetMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoSetSymlinkTarget",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsFileInfo a) =>
a -> m ()
fileInfoUnsetAttributeMask a
info = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
info' <- a -> IO (Ptr FileInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
g_file_info_unset_attribute_mask info'
touchManagedPtr info
return ()
#if defined(ENABLE_OVERLOADING)
data FileInfoUnsetAttributeMaskMethodInfo
instance (signature ~ (m ()), MonadIO m, IsFileInfo a) => O.OverloadedMethod FileInfoUnsetAttributeMaskMethodInfo a signature where
overloadedMethod = fileInfoUnsetAttributeMask
instance O.OverloadedMethodInfo FileInfoUnsetAttributeMaskMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.FileInfo.fileInfoUnsetAttributeMask",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-FileInfo.html#v:fileInfoUnsetAttributeMask"
})
#endif