{-# LANGUAGE DeriveDataTypeable #-}
{-# LINE 2 "./System/GIO/File/File.chs" #-}
module System.GIO.File.File (
File(..),
FileClass,
FileProgressCallback,
FileReadMoreCallback,
Offset,
FileInputStream,
FileInputStreamClass,
FileOutputStream,
FileOutputStreamClass,
InputStream,
InputStreamClass,
OutputStream,
OutputStreamClass,
BufferedInputStream,
BufferedInputStreamClass,
BufferedOutputStream,
BufferedOutputStreamClass,
MemoryInputStream,
MemoryInputStreamClass,
MemoryOutputStream,
MemoryOutputStreamClass,
FilterInputStream,
FilterInputStreamClass,
FilterOutputStream,
FilterOutputStreamClass,
DataInputStream,
DataInputStreamClass,
DataOutputStream,
DataOutputStreamClass,
FileType (..),
FileCopyFlags (..),
FileQueryInfoFlags (..),
FileCreateFlags (..),
FileMonitorFlags (..),
MountMountFlags (..),
MountUnmountFlags (..),
fileFromPath,
fileFromURI,
fileFromCommandlineArg,
fileFromParseName,
fileEqual,
fileBasename,
filePath,
fileHasParent,
fileURI,
fileParseName,
fileGetChild,
fileGetChildForDisplayName,
fileHasPrefix,
fileGetRelativePath,
fileResolveRelativePath,
fileIsNative,
fileHasURIScheme,
fileURIScheme,
fileRead,
fileReadAsync,
fileReadFinish,
fileAppendTo,
fileCreate,
fileReplace,
fileAppendToAsync,
fileAppendToFinish,
fileCreateAsync,
fileCreateFinish,
fileReplaceAsync,
fileReplaceFinish,
fileQueryInfo,
fileQueryInfoAsync,
fileQueryInfoFinish,
fileQueryExists,
fileQueryFileType,
fileQueryFilesystemInfo,
fileQueryFilesystemInfoAsync,
fileQueryFilesystemInfoFinish,
fileQueryDefaultHandler,
fileFindEnclosingMount,
fileFindEnclosingMountAsync,
fileFindEnclosingMountFinish,
fileEnumerateChildren,
fileEnumerateChildrenAsync,
fileEnumerateChildrenFinish,
fileSetDisplayName,
fileSetDisplayNameAsync,
fileSetDisplayNameFinish,
fileDelete,
fileTrash,
fileCopy,
fileCopyAsync,
fileCopyFinish,
fileMove,
fileMakeDirectory,
fileMakeDirectoryWithParents,
fileMakeSymbolicLink,
fileQuerySettableAttributes,
fileQueryWritableNamespaces,
fileSetAttributesFromInfo,
fileSetAttributesFromInfoAsync,
fileSetAttributesFinish,
fileSetAttributeString,
fileSetAttributeByteString,
fileSetAttributeWord32,
fileSetAttributeInt32,
fileSetAttributeWord64,
fileSetAttributeInt64,
fileCopyAttributes,
fileMonitorDirectory,
fileMonitorFile,
fileMonitor,
fileMountMountable,
fileMountMountableFinish,
fileUnmountMountableWithOperation,
fileUnmountMountableWithOperationFinish,
fileEjectMountableWithOperation,
fileEjectMountableWithOperationFinish,
fileStartMountable,
fileStartMountableFinish,
fileStopMountable,
fileStopMountableFinish,
filePollMountable,
filePollMountableFinish,
fileMountEnclosingVolume,
fileMountEnclosingVolumeFinish,
fileSupportsThreadContexts,
) where
import Control.Monad
import Data.Typeable
import Data.Maybe (fromMaybe)
import Data.ByteString (ByteString)
import Data.ByteString (useAsCString)
import Data.ByteString.Unsafe (unsafePackCStringFinalizer)
import System.GIO.Enums
import System.GIO.File.FileAttribute
import System.Glib.FFI
import System.Glib.Flags
import System.Glib.GError
import System.Glib.GObject
import System.Glib.UTFString
import System.GIO.Async.AsyncResult
{-# LINE 245 "./System/GIO/File/File.chs" #-}
import System.GIO.Types
{-# LINE 246 "./System/GIO/File/File.chs" #-}
import qualified Data.ByteString as BS
{-# LINE 250 "./System/GIO/File/File.chs" #-}
type Offset = (CLong)
{-# LINE 252 "./System/GIO/File/File.chs" #-}
type GFileProgressCallback = FunPtr ((CLong -> (CLong -> ((Ptr ()) -> (IO ())))))
{-# LINE 254 "./System/GIO/File/File.chs" #-}
type FileProgressCallback = Offset -> Offset -> IO ()
foreign import ccall "wrapper" mkFileProgressCallback ::
((CLong) -> (CLong) -> Ptr () -> IO ()) -> IO GFileProgressCallback
marshalFileProgressCallback :: FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback :: FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback FileProgressCallback
fileProgressCallback =
(CLong -> CLong -> Ptr () -> IO ()) -> IO GFileProgressCallback
mkFileProgressCallback ((CLong -> CLong -> Ptr () -> IO ()) -> IO GFileProgressCallback)
-> (CLong -> CLong -> Ptr () -> IO ()) -> IO GFileProgressCallback
forall a b. (a -> b) -> a -> b
$ \ CLong
cCurrentNumBytes CLong
cTotalNumBytes Ptr ()
_ -> do
FileProgressCallback
fileProgressCallback
(CLong -> CLong
forall a b. (Integral a, Num b) => a -> b
fromIntegral CLong
cCurrentNumBytes)
(CLong -> CLong
forall a b. (Integral a, Num b) => a -> b
fromIntegral CLong
cTotalNumBytes)
type FileReadMoreCallback = BS.ByteString -> IO Bool
fileFromPath :: ByteString -> File
fileFromPath :: ByteString -> File
fileFromPath ByteString
path =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ (ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
ByteString -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. ByteString -> (CString -> IO a) -> IO a
useAsCString ByteString
path ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cPath -> CString -> IO (Ptr File)
g_file_new_for_path CString
cPath
fileFromURI :: GlibString string => string -> File
fileFromURI :: forall string. GlibString string => string -> File
fileFromURI string
uri =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ (ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
uri ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cURI -> CString -> IO (Ptr File)
g_file_new_for_uri CString
cURI
fileFromCommandlineArg :: ByteString -> File
fileFromCommandlineArg :: ByteString -> File
fileFromCommandlineArg ByteString
arg =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ (ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
ByteString -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. ByteString -> (CString -> IO a) -> IO a
useAsCString ByteString
arg ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cArg -> CString -> IO (Ptr File)
g_file_new_for_commandline_arg CString
cArg
fileFromParseName :: GlibString string => string -> File
fileFromParseName :: forall string. GlibString string => string -> File
fileFromParseName string
parseName =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ (ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
parseName ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cParseName -> CString -> IO (Ptr File)
g_file_parse_name CString
cParseName
fileEqual :: (FileClass file1, FileClass file2)
=> file1 -> file2 -> Bool
fileEqual :: forall file1 file2.
(FileClass file1, FileClass file2) =>
file1 -> file2 -> Bool
fileEqual file1
file1 file2
file2 =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$ (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->Ptr File -> Ptr File -> IO CInt
g_file_equal Ptr File
argPtr1 Ptr File
argPtr2) (file1 -> File
forall o. FileClass o => o -> File
toFile file1
file1) (file2 -> File
forall o. FileClass o => o -> File
toFile file2
file2)
instance Eq File where
== :: File -> File -> Bool
(==) = File -> File -> Bool
forall file1 file2.
(FileClass file1, FileClass file2) =>
file1 -> file2 -> Bool
fileEqual
fileBasename :: FileClass file => file -> ByteString
fileBasename :: forall file. FileClass file => file -> ByteString
fileBasename file
file =
IO ByteString -> ByteString
forall a. IO a -> a
unsafePerformIO (IO ByteString -> ByteString) -> IO ByteString -> ByteString
forall a b. (a -> b) -> a -> b
$ do
CString
sPtr <- (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CString
g_file_get_basename Ptr File
argPtr1)
{-# LINE 327 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
Int
sLen <- CChar -> CString -> IO Int
forall a. (Storable a, Eq a) => a -> Ptr a -> IO Int
lengthArray0 CChar
0 CString
sPtr
Ptr Word8 -> Int -> IO () -> IO ByteString
unsafePackCStringFinalizer (CString -> Ptr Word8
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr) (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
sLen)
(Ptr () -> IO ()
g_free (CString -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr))
filePath :: FileClass file => file -> ByteString
filePath :: forall file. FileClass file => file -> ByteString
filePath file
file =
IO ByteString -> ByteString
forall a. IO a -> a
unsafePerformIO (IO ByteString -> ByteString) -> IO ByteString -> ByteString
forall a b. (a -> b) -> a -> b
$ do
CString
sPtr <- (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CString
g_file_get_path Ptr File
argPtr1)
{-# LINE 339 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
Int
sLen <- CChar -> CString -> IO Int
forall a. (Storable a, Eq a) => a -> Ptr a -> IO Int
lengthArray0 CChar
0 CString
sPtr
Ptr Word8 -> Int -> IO () -> IO ByteString
unsafePackCStringFinalizer (CString -> Ptr Word8
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr) (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
sLen)
(Ptr () -> IO ()
g_free (CString -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr))
fileURI :: (FileClass file, GlibString string) => file -> string
fileURI :: forall file string.
(FileClass file, GlibString string) =>
file -> string
fileURI file
file =
IO string -> string
forall a. IO a -> a
unsafePerformIO (IO string -> string) -> IO string -> string
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CString
g_file_get_uri Ptr File
argPtr1) (file -> File
forall o. FileClass o => o -> File
toFile file
file) IO CString -> (CString -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO string
forall s. GlibString s => CString -> IO s
readUTFString
fileParseName :: (FileClass file, GlibString string) => file -> string
fileParseName :: forall file string.
(FileClass file, GlibString string) =>
file -> string
fileParseName file
file =
IO string -> string
forall a. IO a -> a
unsafePerformIO (IO string -> string) -> IO string -> string
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CString
g_file_get_parse_name Ptr File
argPtr1) (file -> File
forall o. FileClass o => o -> File
toFile file
file) IO CString -> (CString -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO string
forall s. GlibString s => CString -> IO s
readUTFString
fileParent :: FileClass file => file -> Maybe File
fileParent :: forall file. FileClass file => file -> Maybe File
fileParent file
file =
IO (Maybe File) -> Maybe File
forall a. IO a -> a
unsafePerformIO (IO (Maybe File) -> Maybe File) -> IO (Maybe File) -> Maybe File
forall a b. (a -> b) -> a -> b
$ (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO (Maybe File)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile) (IO (Ptr File) -> IO (Maybe File))
-> IO (Ptr File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO (Ptr File)
g_file_get_parent Ptr File
argPtr1) (file -> File
forall o. FileClass o => o -> File
toFile file
file)
fileHasParent :: FileClass file => file -> Maybe File -> Bool
fileHasParent :: forall file. FileClass file => file -> Maybe File -> Bool
fileHasParent file
file Maybe File
parent =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$ (CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->Ptr File -> Ptr File -> IO CInt
g_file_has_parent Ptr File
argPtr1 Ptr File
argPtr2)
{-# LINE 383 "./System/GIO/File/File.chs" #-}
(toFile file)
(File -> Maybe File -> File
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr File -> File
File ForeignPtr File
forall a. ForeignPtr a
nullForeignPtr) Maybe File
parent)
fileGetChild :: FileClass file => file -> ByteString -> File
fileGetChild :: forall file. FileClass file => file -> ByteString -> File
fileGetChild file
file ByteString
name =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ (ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
ByteString -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. ByteString -> (CString -> IO a) -> IO a
useAsCString ByteString
name ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cName ->
(\(File ForeignPtr File
arg1) CString
arg2 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> CString -> IO (Ptr File)
g_file_get_child Ptr File
argPtr1 CString
arg2) (file -> File
forall o. FileClass o => o -> File
toFile file
file) CString
cName
fileGetChildForDisplayName :: (FileClass file, GlibString string) => file -> string -> File
fileGetChildForDisplayName :: forall file string.
(FileClass file, GlibString string) =>
file -> string -> File
fileGetChildForDisplayName file
file string
displayName =
IO File -> File
forall a. IO a -> a
unsafePerformIO (IO File -> File) -> IO File -> File
forall a b. (a -> b) -> a -> b
$ ((ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile) (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
displayName ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cDisplayName ->
(Ptr (Ptr ()) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> CString -> Ptr (Ptr ()) -> IO (Ptr File)
g_file_get_child_for_display_name Ptr File
argPtr1 CString
arg2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) CString
cDisplayName)
fileHasPrefix :: (FileClass file1, FileClass file2) => file1 -> file2 -> Bool
fileHasPrefix :: forall file1 file2.
(FileClass file1, FileClass file2) =>
file1 -> file2 -> Bool
fileHasPrefix file1
file1 file2
file2 =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->Ptr File -> Ptr File -> IO CInt
g_file_has_prefix Ptr File
argPtr1 Ptr File
argPtr2) (file1 -> File
forall o. FileClass o => o -> File
toFile file1
file1) (file2 -> File
forall o. FileClass o => o -> File
toFile file2
file2)
fileGetRelativePath :: (FileClass file1, FileClass file2) => file1 -> file2 -> Maybe ByteString
fileGetRelativePath :: forall file1 file2.
(FileClass file1, FileClass file2) =>
file1 -> file2 -> Maybe ByteString
fileGetRelativePath file1
file1 file2
file2 =
IO (Maybe ByteString) -> Maybe ByteString
forall a. IO a -> a
unsafePerformIO (IO (Maybe ByteString) -> Maybe ByteString)
-> IO (Maybe ByteString) -> Maybe ByteString
forall a b. (a -> b) -> a -> b
$ do
CString
sPtr <- (\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->Ptr File -> Ptr File -> IO CString
g_file_get_relative_path Ptr File
argPtr1 Ptr File
argPtr2) (file1 -> File
forall o. FileClass o => o -> File
toFile file1
file1) (file2 -> File
forall o. FileClass o => o -> File
toFile file2
file2)
if CString
sPtr CString -> CString -> Bool
forall a. Eq a => a -> a -> Bool
== CString
forall a. Ptr a
nullPtr
then Maybe ByteString -> IO (Maybe ByteString)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ByteString
forall a. Maybe a
Nothing
else do
Int
sLen <- CChar -> CString -> IO Int
forall a. (Storable a, Eq a) => a -> Ptr a -> IO Int
lengthArray0 CChar
0 CString
sPtr
(ByteString -> Maybe ByteString)
-> IO ByteString -> IO (Maybe ByteString)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM ByteString -> Maybe ByteString
forall a. a -> Maybe a
Just (IO ByteString -> IO (Maybe ByteString))
-> IO ByteString -> IO (Maybe ByteString)
forall a b. (a -> b) -> a -> b
$ Ptr Word8 -> Int -> IO () -> IO ByteString
unsafePackCStringFinalizer (CString -> Ptr Word8
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr) (Int -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
sLen)
(Ptr () -> IO ()
g_free (CString -> Ptr ()
forall a b. Ptr a -> Ptr b
castPtr CString
sPtr))
fileResolveRelativePath :: FileClass file => file -> ByteString -> Maybe File
fileResolveRelativePath :: forall file. FileClass file => file -> ByteString -> Maybe File
fileResolveRelativePath file
file ByteString
relativePath =
IO (Maybe File) -> Maybe File
forall a. IO a -> a
unsafePerformIO (IO (Maybe File) -> Maybe File) -> IO (Maybe File) -> Maybe File
forall a b. (a -> b) -> a -> b
$ (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO (Maybe File)
forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
maybeNull ((ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile) (IO (Ptr File) -> IO (Maybe File))
-> IO (Ptr File) -> IO (Maybe File)
forall a b. (a -> b) -> a -> b
$
ByteString -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. ByteString -> (CString -> IO a) -> IO a
useAsCString ByteString
relativePath ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cRelativePath ->
(\(File ForeignPtr File
arg1) CString
arg2 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> CString -> IO (Ptr File)
g_file_resolve_relative_path Ptr File
argPtr1 CString
arg2) (file -> File
forall o. FileClass o => o -> File
toFile file
file) CString
cRelativePath
fileIsNative :: FileClass file => file -> Bool
fileIsNative :: forall file. FileClass file => file -> Bool
fileIsNative =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> (file -> IO Bool) -> file -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
.
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> (file -> IO CInt) -> file -> IO Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CInt
g_file_is_native Ptr File
argPtr1) (File -> IO CInt) -> (file -> File) -> file -> IO CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. file -> File
forall o. FileClass o => o -> File
toFile
fileHasURIScheme :: (FileClass file, GlibString string) => file -> string -> Bool
fileHasURIScheme :: forall file string.
(FileClass file, GlibString string) =>
file -> string -> Bool
fileHasURIScheme file
file string
uriScheme =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO Bool) -> IO Bool
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
uriScheme ((CString -> IO Bool) -> IO Bool)
-> (CString -> IO Bool) -> IO Bool
forall a b. (a -> b) -> a -> b
$ \CString
cURIScheme ->
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) CString
arg2 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> CString -> IO CInt
g_file_has_uri_scheme Ptr File
argPtr1 CString
arg2) (file -> File
forall o. FileClass o => o -> File
toFile file
file) CString
cURIScheme
fileURIScheme :: (FileClass file, GlibString string) => file -> string
fileURIScheme :: forall file string.
(FileClass file, GlibString string) =>
file -> string
fileURIScheme file
file =
IO string -> string
forall a. IO a -> a
unsafePerformIO (IO string -> string) -> IO string -> string
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CString) -> IO CString
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CString) -> IO CString)
-> (Ptr File -> IO CString) -> IO CString
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CString
g_file_get_uri_scheme Ptr File
argPtr1) (file -> File
forall o. FileClass o => o -> File
toFile file
file) IO CString -> (CString -> IO string) -> IO string
forall a b. IO a -> (a -> IO b) -> IO b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= CString -> IO string
forall s. GlibString s => CString -> IO s
readUTFString
fileRead :: FileClass file => file -> Maybe Cancellable -> IO FileInputStream
fileRead :: forall file.
FileClass file =>
file -> Maybe Cancellable -> IO FileInputStream
fileRead file
file Maybe Cancellable
cancellable =
(ForeignPtr FileInputStream -> FileInputStream,
FinalizerPtr FileInputStream)
-> IO (Ptr FileInputStream) -> IO FileInputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileInputStream -> FileInputStream,
FinalizerPtr FileInputStream)
forall {a}.
(ForeignPtr FileInputStream -> FileInputStream, FinalizerPtr a)
mkFileInputStream (IO (Ptr FileInputStream) -> IO FileInputStream)
-> IO (Ptr FileInputStream) -> IO FileInputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream))
-> (Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream))
-> (Ptr Cancellable -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File
-> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr FileInputStream)
g_file_read Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 496 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable))
fileReadAsync :: FileClass file
=> file
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileReadAsync :: forall file.
FileClass file =>
file -> Int -> Maybe Cancellable -> AsyncReadyCallback -> IO ()
fileReadAsync file
file Int
ioPriority Maybe Cancellable
mbCancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) GAsyncReadyCallback
arg4 Ptr ()
arg5 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_read_async Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 GAsyncReadyCallback
arg4 Ptr ()
arg5)
{-# LINE 514 "./System/GIO/File/File.chs" #-}
(toFile file)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
mbCancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileReadFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInputStream
fileReadFinish :: forall file.
FileClass file =>
file -> AsyncResult -> IO FileInputStream
fileReadFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileInputStream -> FileInputStream,
FinalizerPtr FileInputStream)
-> IO (Ptr FileInputStream) -> IO FileInputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileInputStream -> FileInputStream,
FinalizerPtr FileInputStream)
forall {a}.
(ForeignPtr FileInputStream -> FileInputStream, FinalizerPtr a)
mkFileInputStream (IO (Ptr FileInputStream) -> IO FileInputStream)
-> IO (Ptr FileInputStream) -> IO FileInputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream))
-> (Ptr File -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream))
-> (Ptr AsyncResult -> IO (Ptr FileInputStream))
-> IO (Ptr FileInputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileInputStream)
g_file_read_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileAppendTo :: FileClass file
=> file
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileAppendTo :: forall file.
FileClass file =>
file
-> [FileCreateFlags] -> Maybe Cancellable -> IO FileOutputStream
fileAppendTo file
file [FileCreateFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileOutputStream)
g_file_append_to Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 551 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileCreate :: FileClass file
=> file
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileCreate :: forall file.
FileClass file =>
file
-> [FileCreateFlags] -> Maybe Cancellable -> IO FileOutputStream
fileCreate file
file [FileCreateFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileOutputStream)
g_file_create Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 578 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileReplace :: (FileClass file, GlibString string)
=> file
-> Maybe string
-> Bool
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileReplace :: forall file string.
(FileClass file, GlibString string) =>
file
-> Maybe string
-> Bool
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileReplace file
file Maybe string
etag Bool
makeBackup [FileCreateFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(string
-> (CString -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> Maybe string
-> (CString -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b c.
(a -> (Ptr b -> IO c) -> IO c)
-> Maybe a -> (Ptr b -> IO c) -> IO c
maybeWith string
-> (CString -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString Maybe string
etag ((CString -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (CString -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \CString
cEtag ->
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr Cancellable -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CInt
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileOutputStream)
g_file_replace Ptr File
argPtr1 CString
arg2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 624 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cEtag
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
makeBackup)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable))
fileAppendToAsync :: FileClass file
=> file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileAppendToAsync :: forall file.
FileClass file =>
file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileAppendToAsync file
file [FileCreateFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_append_to_async Ptr File
argPtr1 CInt
arg2 CInt
arg3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 646 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileAppendToFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileAppendToFinish :: forall file.
FileClass file =>
file -> AsyncResult -> IO FileOutputStream
fileAppendToFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileOutputStream)
g_file_append_to_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileCreateAsync :: FileClass file
=> file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileCreateAsync :: forall file.
FileClass file =>
file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileCreateAsync file
file [FileCreateFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_create_async Ptr File
argPtr1 CInt
arg2 CInt
arg3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 679 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileCreateFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileCreateFinish :: forall file.
FileClass file =>
file -> AsyncResult -> IO FileOutputStream
fileCreateFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileOutputStream)
g_file_create_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileReplaceAsync :: (FileClass file, GlibString string)
=> file
-> string
-> Bool
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileReplaceAsync :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Bool
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileReplaceAsync file
file string
etag Bool
makeBackup [FileCreateFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
etag ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cEtag -> do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 CInt
arg4 CInt
arg5 (Cancellable ForeignPtr Cancellable
arg6) GAsyncReadyCallback
arg7 Ptr ()
arg8 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg6 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr6 ->Ptr File
-> CString
-> CInt
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_replace_async Ptr File
argPtr1 CString
arg2 CInt
arg3 CInt
arg4 CInt
arg5 Ptr Cancellable
argPtr6 GAsyncReadyCallback
arg7 Ptr ()
arg8)
{-# LINE 715 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cEtag
(Bool -> CInt
forall a. Num a => Bool -> a
fromBool Bool
makeBackup)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCreateFlags] -> Int) -> [FileCreateFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCreateFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCreateFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileReplaceFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileReplaceFinish :: forall file.
FileClass file =>
file -> AsyncResult -> IO FileOutputStream
fileReplaceFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileOutputStream -> FileOutputStream,
FinalizerPtr FileOutputStream)
forall {a}.
(ForeignPtr FileOutputStream -> FileOutputStream, FinalizerPtr a)
mkFileOutputStream (IO (Ptr FileOutputStream) -> IO FileOutputStream)
-> IO (Ptr FileOutputStream) -> IO FileOutputStream
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr File -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream))
-> (Ptr AsyncResult -> IO (Ptr FileOutputStream))
-> IO (Ptr FileOutputStream)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileOutputStream)
g_file_replace_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileQueryInfo :: (FileClass file, GlibString string)
=> file
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileInfo
fileQueryInfo :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileInfo
fileQueryInfo file
file string
attributes [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attributes ((CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes ->
(Ptr (Ptr ()) -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) Ptr (Ptr ())
arg5 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CString
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileInfo)
g_file_query_info Ptr File
argPtr1 CString
arg2 CInt
arg3 Ptr Cancellable
argPtr4 Ptr (Ptr ())
arg5)
{-# LINE 764 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileQueryInfoAsync :: (FileClass file, GlibString string)
=> file
-> string
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryInfoAsync :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryInfoAsync file
file string
attributes [FileQueryInfoFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attributes ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes -> do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) GAsyncReadyCallback
arg6 Ptr ()
arg7 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_query_info_async Ptr File
argPtr1 CString
arg2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 GAsyncReadyCallback
arg6 Ptr ()
arg7)
{-# LINE 789 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileQueryInfoFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInfo
fileQueryInfoFinish :: forall file. FileClass file => file -> AsyncResult -> IO FileInfo
fileQueryInfoFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileInfo)
g_file_query_info_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileQueryExists :: FileClass file
=> file
-> Maybe Cancellable
-> Bool
fileQueryExists :: forall file. FileClass file => file -> Maybe Cancellable -> Bool
fileQueryExists file
file Maybe Cancellable
cancellable =
IO Bool -> Bool
forall a. IO a -> a
unsafePerformIO (IO Bool -> Bool) -> IO Bool -> Bool
forall a b. (a -> b) -> a -> b
$
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> IO CInt
g_file_query_exists Ptr File
argPtr1 Ptr Cancellable
argPtr2)
{-# LINE 832 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
fileQueryFileType :: FileClass file
=> file
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> FileType
fileQueryFileType :: forall file.
FileClass file =>
file -> [FileQueryInfoFlags] -> Maybe Cancellable -> FileType
fileQueryFileType file
file [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
(Int -> FileType
forall a. Enum a => Int -> a
toEnum (Int -> FileType) -> (CInt -> Int) -> CInt -> FileType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) (CInt -> FileType) -> CInt -> FileType
forall a b. (a -> b) -> a -> b
$
IO CInt -> CInt
forall a. IO a -> a
unsafePerformIO (IO CInt -> CInt) -> IO CInt -> CInt
forall a b. (a -> b) -> a -> b
$
((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File -> CInt -> Ptr Cancellable -> IO CInt
g_file_query_file_type Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3)
{-# LINE 849 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable) )
fileQueryFilesystemInfo :: (FileClass file, GlibString string)
=> file
-> string
-> Maybe Cancellable
-> IO FileInfo
fileQueryFilesystemInfo :: forall file string.
(FileClass file, GlibString string) =>
file -> string -> Maybe Cancellable -> IO FileInfo
fileQueryFilesystemInfo file
file string
attributes Maybe Cancellable
cancellable =
(ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attributes ((CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (CString -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes ->
(Ptr (Ptr ()) -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr Cancellable -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CString -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr FileInfo)
g_file_query_filesystem_info Ptr File
argPtr1 CString
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 882 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable) )
fileQueryFilesystemInfoAsync :: (FileClass file, GlibString string)
=> file
-> string
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryFilesystemInfoAsync :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryFilesystemInfoAsync file
file string
attributes Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attributes ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes -> do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CString
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_query_filesystem_info_async Ptr File
argPtr1 CString
arg2 CInt
arg3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 905 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileQueryFilesystemInfoFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInfo
fileQueryFilesystemInfoFinish :: forall file. FileClass file => file -> AsyncResult -> IO FileInfo
fileQueryFilesystemInfoFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
makeNewGObject (ForeignPtr FileInfo -> FileInfo, FinalizerPtr FileInfo)
forall {a}. (ForeignPtr FileInfo -> FileInfo, FinalizerPtr a)
mkFileInfo (IO (Ptr FileInfo) -> IO FileInfo)
-> IO (Ptr FileInfo) -> IO FileInfo
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr File -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo))
-> (Ptr AsyncResult -> IO (Ptr FileInfo)) -> IO (Ptr FileInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileInfo)
g_file_query_filesystem_info_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileQueryDefaultHandler :: FileClass file
=> file
-> Maybe Cancellable
-> IO AppInfo
fileQueryDefaultHandler :: forall file.
FileClass file =>
file -> Maybe Cancellable -> IO AppInfo
fileQueryDefaultHandler file
file Maybe Cancellable
cancellable =
(ForeignPtr AppInfo -> AppInfo, FinalizerPtr AppInfo)
-> IO (Ptr AppInfo) -> IO AppInfo
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr AppInfo -> AppInfo, FinalizerPtr AppInfo)
forall {a}. (ForeignPtr AppInfo -> AppInfo, FinalizerPtr a)
mkAppInfo (IO (Ptr AppInfo) -> IO AppInfo) -> IO (Ptr AppInfo) -> IO AppInfo
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo))
-> (Ptr File -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo))
-> (Ptr Cancellable -> IO (Ptr AppInfo)) -> IO (Ptr AppInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr AppInfo)
g_file_query_default_handler Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 934 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable) )
fileFindEnclosingMount :: FileClass file
=> file
-> Maybe Cancellable
-> IO Mount
fileFindEnclosingMount :: forall file.
FileClass file =>
file -> Maybe Cancellable -> IO Mount
fileFindEnclosingMount file
file Maybe Cancellable
cancellable =
(ForeignPtr Mount -> Mount, FinalizerPtr Mount)
-> IO (Ptr Mount) -> IO Mount
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Mount -> Mount, FinalizerPtr Mount)
forall {a}. (ForeignPtr Mount -> Mount, FinalizerPtr a)
mkMount (IO (Ptr Mount) -> IO Mount) -> IO (Ptr Mount) -> IO Mount
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount))
-> (Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO (Ptr Mount)) -> IO (Ptr Mount))
-> (Ptr Cancellable -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr Mount)
g_file_find_enclosing_mount Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 952 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileFindEnclosingMountAsync :: FileClass file
=> file
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileFindEnclosingMountAsync :: forall file.
FileClass file =>
file -> Int -> Maybe Cancellable -> AsyncReadyCallback -> IO ()
fileFindEnclosingMountAsync file
file Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) GAsyncReadyCallback
arg4 Ptr ()
arg5 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_find_enclosing_mount_async Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 GAsyncReadyCallback
arg4 Ptr ()
arg5)
{-# LINE 971 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileFindEnclosingMountFinish :: FileClass file
=> file
-> AsyncResult
-> IO Mount
fileFindEnclosingMountFinish :: forall file. FileClass file => file -> AsyncResult -> IO Mount
fileFindEnclosingMountFinish file
file AsyncResult
asyncResult =
(ForeignPtr Mount -> Mount, FinalizerPtr Mount)
-> IO (Ptr Mount) -> IO Mount
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr Mount -> Mount, FinalizerPtr Mount)
forall {a}. (ForeignPtr Mount -> Mount, FinalizerPtr a)
mkMount (IO (Ptr Mount) -> IO Mount) -> IO (Ptr Mount) -> IO Mount
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount))
-> (Ptr File -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr Mount)) -> IO (Ptr Mount))
-> (Ptr AsyncResult -> IO (Ptr Mount)) -> IO (Ptr Mount)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr Mount)
g_file_find_enclosing_mount_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileEnumerateChildren :: FileClass file
=> file
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileEnumerator
fileEnumerateChildren :: forall file.
FileClass file =>
file
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileEnumerator
fileEnumerateChildren file
file String
attributes [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileEnumerator -> FileEnumerator,
FinalizerPtr FileEnumerator)
-> IO (Ptr FileEnumerator) -> IO FileEnumerator
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileEnumerator -> FileEnumerator,
FinalizerPtr FileEnumerator)
forall {a}.
(ForeignPtr FileEnumerator -> FileEnumerator, FinalizerPtr a)
mkFileEnumerator (IO (Ptr FileEnumerator) -> IO FileEnumerator)
-> IO (Ptr FileEnumerator) -> IO FileEnumerator
forall a b. (a -> b) -> a -> b
$
String
-> (CString -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a. String -> (CString -> IO a) -> IO a
withCString String
attributes ((CString -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator))
-> (CString -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes ->
(Ptr (Ptr ()) -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) Ptr (Ptr ())
arg5 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator))
-> (Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator))
-> (Ptr Cancellable -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CString
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileEnumerator)
g_file_enumerate_children Ptr File
argPtr1 CString
arg2 CInt
arg3 Ptr Cancellable
argPtr4 Ptr (Ptr ())
arg5)
{-# LINE 1012 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileEnumerateChildrenAsync :: (FileClass file, GlibString string)
=> file
-> string
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEnumerateChildrenAsync :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEnumerateChildrenAsync file
file string
attributes [FileQueryInfoFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attributes ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cAttributes -> do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) GAsyncReadyCallback
arg6 Ptr ()
arg7 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_enumerate_children_async Ptr File
argPtr1 CString
arg2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 GAsyncReadyCallback
arg6 Ptr ()
arg7)
{-# LINE 1037 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cAttributes
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileEnumerateChildrenFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileEnumerator
fileEnumerateChildrenFinish :: forall file.
FileClass file =>
file -> AsyncResult -> IO FileEnumerator
fileEnumerateChildrenFinish file
file AsyncResult
asyncResult =
(ForeignPtr FileEnumerator -> FileEnumerator,
FinalizerPtr FileEnumerator)
-> IO (Ptr FileEnumerator) -> IO FileEnumerator
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileEnumerator -> FileEnumerator,
FinalizerPtr FileEnumerator)
forall {a}.
(ForeignPtr FileEnumerator -> FileEnumerator, FinalizerPtr a)
mkFileEnumerator (IO (Ptr FileEnumerator) -> IO FileEnumerator)
-> IO (Ptr FileEnumerator) -> IO FileEnumerator
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator))
-> (Ptr File -> IO (Ptr FileEnumerator)) -> IO (Ptr FileEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator))
-> (Ptr AsyncResult -> IO (Ptr FileEnumerator))
-> IO (Ptr FileEnumerator)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr FileEnumerator)
g_file_enumerate_children_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileSetDisplayName :: (FileClass file, GlibString string)
=> file
-> string
-> Maybe Cancellable
-> IO File
fileSetDisplayName :: forall file string.
(FileClass file, GlibString string) =>
file -> string -> Maybe Cancellable -> IO File
fileSetDisplayName file
file string
displayName Maybe Cancellable
cancellable =
(ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
string -> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
displayName ((CString -> IO (Ptr File)) -> IO (Ptr File))
-> (CString -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \CString
cDisplayName ->
(Ptr (Ptr ()) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CString
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr Cancellable -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CString -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr File)
g_file_set_display_name Ptr File
argPtr1 CString
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 1077 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cDisplayName
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable) )
fileSetDisplayNameAsync :: (FileClass file, GlibString string)
=> file
-> string
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetDisplayNameAsync :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetDisplayNameAsync file
file string
displayName Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
displayName ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cDisplayName -> do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CString
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_set_display_name_async Ptr File
argPtr1 CString
arg2 CInt
arg3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1098 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cDisplayName
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileSetDisplayNameFinish :: FileClass file
=> file
-> AsyncResult
-> IO File
fileSetDisplayNameFinish :: forall file. FileClass file => file -> AsyncResult -> IO File
fileSetDisplayNameFinish file
file AsyncResult
asyncResult =
(ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr File)
g_file_set_display_name_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
asyncResult)
fileDelete :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileDelete :: forall file. FileClass file => file -> Maybe Cancellable -> IO ()
fileDelete file
file Maybe Cancellable
cancellable =
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_delete Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1125 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
) IO CInt -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileTrash :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileTrash :: forall file. FileClass file => file -> Maybe Cancellable -> IO ()
fileTrash file
file Maybe Cancellable
cancellable =
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_trash Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1142 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
) IO CInt -> IO () -> IO ()
forall a b. IO a -> IO b -> IO b
forall (m :: * -> *) a b. Monad m => m a -> m b -> m b
>> () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileCopy :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileCopy :: forall source destination.
(FileClass source, FileClass destination) =>
source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileCopy source
source destination
destination [FileCopyFlags]
flags Maybe Cancellable
cancellable Maybe FileProgressCallback
progressCallback = do
GFileProgressCallback
cProgressCallback <- IO GFileProgressCallback
-> (FileProgressCallback -> IO GFileProgressCallback)
-> Maybe FileProgressCallback
-> IO GFileProgressCallback
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (GFileProgressCallback -> IO GFileProgressCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GFileProgressCallback
forall a. FunPtr a
nullFunPtr) FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback Maybe FileProgressCallback
progressCallback
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
cError -> do
(\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GFileProgressCallback
arg5 Ptr ()
arg6 Ptr (Ptr ())
arg7 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> Ptr File
-> CInt
-> Ptr Cancellable
-> GFileProgressCallback
-> Ptr ()
-> Ptr (Ptr ())
-> IO CInt
g_file_copy Ptr File
argPtr1 Ptr File
argPtr2 CInt
arg3 Ptr Cancellable
argPtr4 GFileProgressCallback
arg5 Ptr ()
arg6 Ptr (Ptr ())
arg7)
{-# LINE 1187 "./System/GIO/File/File.chs" #-}
(source -> File
forall o. FileClass o => o -> File
toFile source
source)
(destination -> File
forall o. FileClass o => o -> File
toFile destination
destination)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCopyFlags] -> Int) -> [FileCopyFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCopyFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCopyFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GFileProgressCallback
cProgressCallback
Ptr ()
forall a. Ptr a
nullPtr
Ptr (Ptr ())
cError
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (GFileProgressCallback
cProgressCallback GFileProgressCallback -> GFileProgressCallback -> Bool
forall a. Eq a => a -> a -> Bool
/= GFileProgressCallback
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
GFileProgressCallback -> IO ()
forall a. FunPtr a -> IO ()
freeHaskellFunPtr GFileProgressCallback
cProgressCallback
fileCopyAsync :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Int
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> AsyncReadyCallback
-> IO ()
fileCopyAsync :: forall source destination.
(FileClass source, FileClass destination) =>
source
-> destination
-> [FileCopyFlags]
-> Int
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> AsyncReadyCallback
-> IO ()
fileCopyAsync source
source destination
destination [FileCopyFlags]
flags Int
ioPriority Maybe Cancellable
cancellable Maybe FileProgressCallback
progressCallback AsyncReadyCallback
callback = do
GFileProgressCallback
cProgressCallback <- IO GFileProgressCallback
-> (FileProgressCallback -> IO GFileProgressCallback)
-> Maybe FileProgressCallback
-> IO GFileProgressCallback
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (GFileProgressCallback -> IO GFileProgressCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GFileProgressCallback
forall a. FunPtr a
nullFunPtr) FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback Maybe FileProgressCallback
progressCallback
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback (AsyncReadyCallback -> IO GAsyncReadyCallback)
-> AsyncReadyCallback -> IO GAsyncReadyCallback
forall a b. (a -> b) -> a -> b
$ \GObject
sourceObject AsyncResult
res -> do
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (GFileProgressCallback
cProgressCallback GFileProgressCallback -> GFileProgressCallback -> Bool
forall a. Eq a => a -> a -> Bool
/= GFileProgressCallback
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
GFileProgressCallback -> IO ()
forall a. FunPtr a -> IO ()
freeHaskellFunPtr GFileProgressCallback
cProgressCallback
AsyncReadyCallback
callback GObject
sourceObject AsyncResult
res
(\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) GFileProgressCallback
arg6 Ptr ()
arg7 GAsyncReadyCallback
arg8 Ptr ()
arg9 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> Ptr File
-> CInt
-> CInt
-> Ptr Cancellable
-> GFileProgressCallback
-> Ptr ()
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_copy_async Ptr File
argPtr1 Ptr File
argPtr2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 GFileProgressCallback
arg6 Ptr ()
arg7 GAsyncReadyCallback
arg8 Ptr ()
arg9)
{-# LINE 1221 "./System/GIO/File/File.chs" #-}
(source -> File
forall o. FileClass o => o -> File
toFile source
source)
(destination -> File
forall o. FileClass o => o -> File
toFile destination
destination)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCopyFlags] -> Int) -> [FileCopyFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCopyFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCopyFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GFileProgressCallback
cProgressCallback
Ptr ()
forall a. Ptr a
nullPtr
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileCopyFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileCopyFinish :: forall file. FileClass file => file -> AsyncResult -> IO ()
fileCopyFinish file
file AsyncResult
asyncResult =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_copy_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1241 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
asyncResult
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileMove :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileMove :: forall source destination.
(FileClass source, FileClass destination) =>
source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileMove source
source destination
destination [FileCopyFlags]
flags Maybe Cancellable
cancellable Maybe FileProgressCallback
progressCallback = do
GFileProgressCallback
cProgressCallback <- IO GFileProgressCallback
-> (FileProgressCallback -> IO GFileProgressCallback)
-> Maybe FileProgressCallback
-> IO GFileProgressCallback
forall b a. b -> (a -> b) -> Maybe a -> b
maybe (GFileProgressCallback -> IO GFileProgressCallback
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GFileProgressCallback
forall a. FunPtr a
nullFunPtr) FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback Maybe FileProgressCallback
progressCallback
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO ()) -> IO ())
-> (Ptr (Ptr ()) -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr (Ptr ())
cError -> do
(\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) GFileProgressCallback
arg5 Ptr ()
arg6 Ptr (Ptr ())
arg7 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> Ptr File
-> CInt
-> Ptr Cancellable
-> GFileProgressCallback
-> Ptr ()
-> Ptr (Ptr ())
-> IO CInt
g_file_move Ptr File
argPtr1 Ptr File
argPtr2 CInt
arg3 Ptr Cancellable
argPtr4 GFileProgressCallback
arg5 Ptr ()
arg6 Ptr (Ptr ())
arg7)
{-# LINE 1288 "./System/GIO/File/File.chs" #-}
(source -> File
forall o. FileClass o => o -> File
toFile source
source)
(destination -> File
forall o. FileClass o => o -> File
toFile destination
destination)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCopyFlags] -> Int) -> [FileCopyFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCopyFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCopyFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GFileProgressCallback
cProgressCallback
Ptr ()
forall a. Ptr a
nullPtr
Ptr (Ptr ())
cError
Bool -> IO () -> IO ()
forall (f :: * -> *). Applicative f => Bool -> f () -> f ()
when (GFileProgressCallback
cProgressCallback GFileProgressCallback -> GFileProgressCallback -> Bool
forall a. Eq a => a -> a -> Bool
/= GFileProgressCallback
forall a. FunPtr a
nullFunPtr) (IO () -> IO ()) -> IO () -> IO ()
forall a b. (a -> b) -> a -> b
$
GFileProgressCallback -> IO ()
forall a. FunPtr a -> IO ()
freeHaskellFunPtr GFileProgressCallback
cProgressCallback
fileMakeDirectory :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileMakeDirectory :: forall file. FileClass file => file -> Maybe Cancellable -> IO ()
fileMakeDirectory file
file Maybe Cancellable
cancellable = do
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_make_directory Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1316 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileMakeDirectoryWithParents :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileMakeDirectoryWithParents :: forall file. FileClass file => file -> Maybe Cancellable -> IO ()
fileMakeDirectoryWithParents file
file Maybe Cancellable
cancellable = do
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_make_directory_with_parents Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1337 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
fileMakeSymbolicLink :: FileClass file
=> file
-> ByteString
-> Maybe Cancellable
-> IO ()
fileMakeSymbolicLink :: forall file.
FileClass file =>
file -> ByteString -> Maybe Cancellable -> IO ()
fileMakeSymbolicLink file
file ByteString
symlinkValue Maybe Cancellable
cancellable =
ByteString -> (CString -> IO ()) -> IO ()
forall a. ByteString -> (CString -> IO a) -> IO a
useAsCString ByteString
symlinkValue ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \CString
cSymlinkValue -> do
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ (\(File ForeignPtr File
arg1) CString
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File -> CString -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_make_symbolic_link Ptr File
argPtr1 CString
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 1355 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
cSymlinkValue
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
newtype FileAttributeInfoList = FileAttributeInfoList (Ptr (FileAttributeInfoList))
{-# LINE 1361 "./System/GIO/File/File.chs" #-}
takeFileAttributeInfoList :: Ptr FileAttributeInfoList
-> IO [FileAttributeInfo]
takeFileAttributeInfoList :: Ptr FileAttributeInfoList -> IO [FileAttributeInfo]
takeFileAttributeInfoList Ptr FileAttributeInfoList
ptr =
do Ptr FileAttributeInfo
cInfos <- (Ptr () -> Ptr FileAttributeInfo)
-> IO (Ptr ()) -> IO (Ptr FileAttributeInfo)
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM Ptr () -> Ptr FileAttributeInfo
forall a b. Ptr a -> Ptr b
castPtr (IO (Ptr ()) -> IO (Ptr FileAttributeInfo))
-> IO (Ptr ()) -> IO (Ptr FileAttributeInfo)
forall a b. (a -> b) -> a -> b
$ (\Ptr FileAttributeInfoList
ptr -> do {Ptr FileAttributeInfoList -> Int -> IO (Ptr ())
forall b. Ptr b -> Int -> IO (Ptr ())
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr FileAttributeInfoList
ptr Int
0 ::IO (Ptr ())}) Ptr FileAttributeInfoList
ptr
CInt
cNInfos <- (\Ptr FileAttributeInfoList
ptr -> do {Ptr FileAttributeInfoList -> Int -> IO CInt
forall b. Ptr b -> Int -> IO CInt
forall a b. Storable a => Ptr b -> Int -> IO a
peekByteOff Ptr FileAttributeInfoList
ptr Int
8 ::IO CInt}) Ptr FileAttributeInfoList
ptr
[FileAttributeInfo]
infos <- Int -> Ptr FileAttributeInfo -> IO [FileAttributeInfo]
forall a. Storable a => Int -> Ptr a -> IO [a]
peekArray (CInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral CInt
cNInfos) Ptr FileAttributeInfo
cInfos
[FileAttributeInfo] -> IO [FileAttributeInfo]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [FileAttributeInfo]
infos
fileQuerySettableAttributes :: FileClass file
=> file
-> Maybe Cancellable
-> IO [FileAttributeInfo]
fileQuerySettableAttributes :: forall file.
FileClass file =>
file -> Maybe Cancellable -> IO [FileAttributeInfo]
fileQuerySettableAttributes file
file Maybe Cancellable
cancellable = do
Ptr FileAttributeInfoList
ptr <- (Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileAttributeInfoList)
g_file_query_settable_attributes Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1385 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
[FileAttributeInfo]
infos <- Ptr FileAttributeInfoList -> IO [FileAttributeInfo]
takeFileAttributeInfoList Ptr FileAttributeInfoList
ptr
[FileAttributeInfo] -> IO [FileAttributeInfo]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [FileAttributeInfo]
infos
fileQueryWritableNamespaces :: FileClass file
=> file
-> Maybe Cancellable
-> IO [FileAttributeInfo]
fileQueryWritableNamespaces :: forall file.
FileClass file =>
file -> Maybe Cancellable -> IO [FileAttributeInfo]
fileQueryWritableNamespaces file
file Maybe Cancellable
cancellable = do
Ptr FileAttributeInfoList
ptr <- (Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr (Ptr ()) -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr File -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList))
-> (Ptr Cancellable -> IO (Ptr FileAttributeInfoList))
-> IO (Ptr FileAttributeInfoList)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO (Ptr FileAttributeInfoList)
g_file_query_writable_namespaces Ptr File
argPtr1 Ptr Cancellable
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1403 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
[FileAttributeInfo]
infos <- Ptr FileAttributeInfoList -> IO [FileAttributeInfo]
takeFileAttributeInfoList Ptr FileAttributeInfoList
ptr
[FileAttributeInfo] -> IO [FileAttributeInfo]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [FileAttributeInfo]
infos
fileSetAttributesFromInfo :: FileClass file => file
-> FileInfo
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributesFromInfo :: forall file.
FileClass file =>
file
-> FileInfo -> [FileQueryInfoFlags] -> Maybe Cancellable -> IO ()
fileSetAttributesFromInfo file
file FileInfo
fileInfo [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (FileInfo ForeignPtr FileInfo
arg2) CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) Ptr (Ptr ())
arg5 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr FileInfo -> (Ptr FileInfo -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileInfo
arg2 ((Ptr FileInfo -> IO CInt) -> IO CInt)
-> (Ptr FileInfo -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> Ptr FileInfo
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attributes_from_info Ptr File
argPtr1 Ptr FileInfo
argPtr2 CInt
arg3 Ptr Cancellable
argPtr4 Ptr (Ptr ())
arg5)
{-# LINE 1425 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(FileInfo -> FileInfo
forall o. FileInfoClass o => o -> FileInfo
toFileInfo FileInfo
fileInfo)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributesFromInfoAsync :: FileClass file => file
-> FileInfo
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetAttributesFromInfoAsync :: forall file.
FileClass file =>
file
-> FileInfo
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetAttributesFromInfoAsync file
file FileInfo
fileInfo [FileQueryInfoFlags]
flags Int
ioPriority Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) (FileInfo ForeignPtr FileInfo
arg2) CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) GAsyncReadyCallback
arg6 Ptr ()
arg7 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr FileInfo
arg2 ((Ptr FileInfo -> IO ()) -> IO ())
-> (Ptr FileInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> Ptr FileInfo
-> CInt
-> CInt
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_set_attributes_async Ptr File
argPtr1 Ptr FileInfo
argPtr2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 GAsyncReadyCallback
arg6 Ptr ()
arg7)
{-# LINE 1449 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(FileInfo -> FileInfo
forall o. FileInfoClass o => o -> FileInfo
toFileInfo FileInfo
fileInfo)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int
ioPriority)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileSetAttributesFinish :: FileClass file
=> file
-> AsyncResult
-> FileInfo
-> IO ()
fileSetAttributesFinish :: forall file.
FileClass file =>
file -> AsyncResult -> FileInfo -> IO ()
fileSetAttributesFinish file
file AsyncResult
asyncResult FileInfo
fileInfo =
ForeignPtr FileInfo -> (Ptr FileInfo -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr (FileInfo -> ForeignPtr FileInfo
unFileInfo FileInfo
fileInfo) ((Ptr FileInfo -> IO ()) -> IO ())
-> (Ptr FileInfo -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr FileInfo
cFileInfo ->
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr FileInfo
arg3 Ptr (Ptr ())
arg4 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File
-> Ptr AsyncResult -> Ptr FileInfo -> Ptr (Ptr ()) -> IO CInt
g_file_set_attributes_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr FileInfo
arg3 Ptr (Ptr ())
arg4)
{-# LINE 1469 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
asyncResult
Ptr FileInfo
cFileInfo
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeString :: (FileClass file, GlibString string) => file
-> string
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeString :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeString file
file string
attribute string
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
value ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
valuePtr -> do
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CString
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CString
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_string Ptr File
argPtr1 CString
arg2 CString
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1492 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
CString
valuePtr
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeByteString :: (FileClass file, GlibString string) => file
-> string
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeByteString :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> string
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeByteString file
file string
attribute string
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
value ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
valuePtr -> do
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CString
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CString
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_byte_string Ptr File
argPtr1 CString
arg2 CString
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1517 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
CString
valuePtr
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeWord32 :: (FileClass file, GlibString string) => file
-> string
-> Word32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord32 :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Word32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord32 file
file string
attribute Word32
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CUInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CUInt
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_uint32 Ptr File
argPtr1 CString
arg2 CUInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1541 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
(Word32 -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word32
value)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeInt32 :: (FileClass file, GlibString string) => file
-> string
-> Int32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt32 :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Int32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt32 file
file string
attribute Int32
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CInt
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CInt
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_int32 Ptr File
argPtr1 CString
arg2 CInt
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1565 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
(Int32 -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int32
value)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeWord64 :: (FileClass file, GlibString string) => file
-> string
-> Word64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord64 :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Word64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord64 file
file string
attribute Word64
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CULong
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CULong
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_uint64 Ptr File
argPtr1 CString
arg2 CULong
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1589 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
(Word64 -> CULong
forall a b. (Integral a, Num b) => a -> b
fromIntegral Word64
value)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileSetAttributeInt64 :: (FileClass file, GlibString string) => file
-> string
-> Int64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt64 :: forall file string.
(FileClass file, GlibString string) =>
file
-> string
-> Int64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt64 file
file string
attribute Int64
value [FileQueryInfoFlags]
flags Maybe Cancellable
cancellable =
string -> (CString -> IO ()) -> IO ()
forall a. string -> (CString -> IO a) -> IO a
forall s a. GlibString s => s -> (CString -> IO a) -> IO a
withUTFString string
attribute ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \ CString
attributePtr ->
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) CString
arg2 CLong
arg3 CInt
arg4 (Cancellable ForeignPtr Cancellable
arg5) Ptr (Ptr ())
arg6 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg5 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr5 ->Ptr File
-> CString
-> CLong
-> CInt
-> Ptr Cancellable
-> Ptr (Ptr ())
-> IO CInt
g_file_set_attribute_int64 Ptr File
argPtr1 CString
arg2 CLong
arg3 CInt
arg4 Ptr Cancellable
argPtr5 Ptr (Ptr ())
arg6)
{-# LINE 1613 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
CString
attributePtr
(Int64 -> CLong
forall a b. (Integral a, Num b) => a -> b
fromIntegral Int64
value)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileQueryInfoFlags] -> Int) -> [FileQueryInfoFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileQueryInfoFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileQueryInfoFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileCopyAttributes :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> IO ()
fileCopyAttributes :: forall source destination.
(FileClass source, FileClass destination) =>
source
-> destination -> [FileCopyFlags] -> Maybe Cancellable -> IO ()
fileCopyAttributes source
source destination
destination [FileCopyFlags]
flags Maybe Cancellable
cancellable =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (File ForeignPtr File
arg2) CInt
arg3 (Cancellable ForeignPtr Cancellable
arg4) Ptr (Ptr ())
arg5 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg2 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr2 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO CInt) -> IO CInt)
-> (Ptr Cancellable -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> Ptr File -> CInt -> Ptr Cancellable -> Ptr (Ptr ()) -> IO CInt
g_file_copy_attributes Ptr File
argPtr1 Ptr File
argPtr2 CInt
arg3 Ptr Cancellable
argPtr4 Ptr (Ptr ())
arg5)
{-# LINE 1636 "./System/GIO/File/File.chs" #-}
(source -> File
forall o. FileClass o => o -> File
toFile source
source)
(destination -> File
forall o. FileClass o => o -> File
toFile destination
destination)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileCopyFlags] -> Int) -> [FileCopyFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileCopyFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileCopyFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileMonitorDirectory :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitorDirectory :: forall file.
FileClass file =>
file -> [FileMonitorFlags] -> Maybe Cancellable -> IO FileMonitor
fileMonitorDirectory file
file [FileMonitorFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
forall {a}. (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr a)
mkFileMonitor (IO (Ptr FileMonitor) -> IO FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr FileMonitor)
g_file_monitor_directory Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 1657 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileMonitorFlags] -> Int) -> [FileMonitorFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileMonitorFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileMonitorFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileMonitorFile :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitorFile :: forall file.
FileClass file =>
file -> [FileMonitorFlags] -> Maybe Cancellable -> IO FileMonitor
fileMonitorFile file
file [FileMonitorFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
forall {a}. (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr a)
mkFileMonitor (IO (Ptr FileMonitor) -> IO FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr FileMonitor)
g_file_monitor_file Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 1676 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileMonitorFlags] -> Int) -> [FileMonitorFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileMonitorFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileMonitorFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileMonitor :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitor :: forall file.
FileClass file =>
file -> [FileMonitorFlags] -> Maybe Cancellable -> IO FileMonitor
fileMonitor file
file [FileMonitorFlags]
flags Maybe Cancellable
cancellable =
(ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr FileMonitor)
forall {a}. (ForeignPtr FileMonitor -> FileMonitor, FinalizerPtr a)
mkFileMonitor (IO (Ptr FileMonitor) -> IO FileMonitor)
-> IO (Ptr FileMonitor) -> IO FileMonitor
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) CInt
arg2 (Cancellable ForeignPtr Cancellable
arg3) Ptr (Ptr ())
arg4 -> ForeignPtr File
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr File -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg3 ((Ptr Cancellable -> IO (Ptr FileMonitor)) -> IO (Ptr FileMonitor))
-> (Ptr Cancellable -> IO (Ptr FileMonitor))
-> IO (Ptr FileMonitor)
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr3 ->Ptr File
-> CInt -> Ptr Cancellable -> Ptr (Ptr ()) -> IO (Ptr FileMonitor)
g_file_monitor Ptr File
argPtr1 CInt
arg2 Ptr Cancellable
argPtr3 Ptr (Ptr ())
arg4)
{-# LINE 1695 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([FileMonitorFlags] -> Int) -> [FileMonitorFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [FileMonitorFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [FileMonitorFlags]
flags)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
)
fileMountMountable :: FileClass file => file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountMountable :: forall file.
FileClass file =>
file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountMountable file
file [MountMountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_mount_mountable Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1719 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountMountFlags] -> Int) -> [MountMountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountMountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountMountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileMountMountableFinish :: FileClass file => file
-> AsyncResult
-> IO File
fileMountMountableFinish :: forall file. FileClass file => file -> AsyncResult -> IO File
fileMountMountableFinish file
file AsyncResult
result =
(ForeignPtr File -> File, FinalizerPtr File)
-> IO (Ptr File) -> IO File
forall obj.
GObjectClass obj =>
(ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
wrapNewGObject (ForeignPtr File -> File, FinalizerPtr File)
forall {a}. (ForeignPtr File -> File, FinalizerPtr a)
mkFile (IO (Ptr File) -> IO File) -> IO (Ptr File) -> IO File
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO (Ptr File)) -> IO (Ptr File)
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr File -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult
-> (Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File)
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File))
-> (Ptr AsyncResult -> IO (Ptr File)) -> IO (Ptr File)
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO (Ptr File)
g_file_mount_mountable_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
result)
fileUnmountMountableWithOperation :: FileClass file => file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileUnmountMountableWithOperation :: forall file.
FileClass file =>
file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileUnmountMountableWithOperation file
file [MountUnmountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_unmount_mountable_with_operation Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1754 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountUnmountFlags] -> Int) -> [MountUnmountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountUnmountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountUnmountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileUnmountMountableWithOperationFinish :: FileClass file => file
-> AsyncResult
-> IO ()
fileUnmountMountableWithOperationFinish :: forall file. FileClass file => file -> AsyncResult -> IO ()
fileUnmountMountableWithOperationFinish file
file AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_unmount_mountable_with_operation_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1773 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileEjectMountableWithOperation :: FileClass file => file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEjectMountableWithOperation :: forall file.
FileClass file =>
file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEjectMountableWithOperation file
file [MountUnmountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_eject_mountable_with_operation Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1794 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountUnmountFlags] -> Int) -> [MountUnmountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountUnmountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountUnmountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileEjectMountableWithOperationFinish :: FileClass file => file
-> AsyncResult
-> IO ()
fileEjectMountableWithOperationFinish :: forall file. FileClass file => file -> AsyncResult -> IO ()
fileEjectMountableWithOperationFinish file
file AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_eject_mountable_with_operation_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1810 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileStartMountable :: FileClass file
=> file
-> [DriveStartFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStartMountable :: forall file.
FileClass file =>
file
-> [DriveStartFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStartMountable file
file [DriveStartFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_start_mountable Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1834 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([DriveStartFlags] -> Int) -> [DriveStartFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [DriveStartFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [DriveStartFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileStartMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileStartMountableFinish :: forall file. FileClass file => file -> AsyncResult -> IO ()
fileStartMountableFinish file
file AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_start_mountable_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1853 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
fileStopMountable :: FileClass file
=> file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStopMountable :: forall file.
FileClass file =>
file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStopMountable file
file [MountUnmountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_stop_mountable Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1876 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountUnmountFlags] -> Int) -> [MountUnmountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountUnmountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountUnmountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileStopMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileStopMountableFinish :: forall file. FileClass file => file -> AsyncResult -> IO ()
fileStopMountableFinish file
file AsyncResult
result =
(Ptr (Ptr ()) -> IO ()) -> IO ()
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError (\Ptr (Ptr ())
gErrorPtr -> do
(\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_stop_mountable_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3)
{-# LINE 1895 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
AsyncResult
result
Ptr (Ptr ())
gErrorPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ())
filePollMountable :: FileClass file => file
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
filePollMountable :: forall file.
FileClass file =>
file -> Maybe Cancellable -> AsyncReadyCallback -> IO ()
filePollMountable file
file Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) (Cancellable ForeignPtr Cancellable
arg2) GAsyncReadyCallback
arg3 Ptr ()
arg4 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg2 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr2 ->Ptr File
-> Ptr Cancellable -> GAsyncReadyCallback -> Ptr () -> IO ()
g_file_poll_mountable Ptr File
argPtr1 Ptr Cancellable
argPtr2 GAsyncReadyCallback
arg3 Ptr ()
arg4)
{-# LINE 1915 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
filePollMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO Bool
filePollMountableFinish :: forall file. FileClass file => file -> AsyncResult -> IO Bool
filePollMountableFinish file
file AsyncResult
result =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_poll_mountable_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
result)
fileMountEnclosingVolume :: FileClass file => file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountEnclosingVolume :: forall file.
FileClass file =>
file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountEnclosingVolume file
file [MountMountFlags]
flags Maybe MountOperation
mountOperation Maybe Cancellable
cancellable AsyncReadyCallback
callback = do
GAsyncReadyCallback
cCallback <- AsyncReadyCallback -> IO GAsyncReadyCallback
marshalAsyncReadyCallback AsyncReadyCallback
callback
(\(File ForeignPtr File
arg1) CInt
arg2 (MountOperation ForeignPtr MountOperation
arg3) (Cancellable ForeignPtr Cancellable
arg4) GAsyncReadyCallback
arg5 Ptr ()
arg6 -> ForeignPtr File -> (Ptr File -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO ()) -> IO ()) -> (Ptr File -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr MountOperation -> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr MountOperation
arg3 ((Ptr MountOperation -> IO ()) -> IO ())
-> (Ptr MountOperation -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr MountOperation
argPtr3 ->ForeignPtr Cancellable -> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr Cancellable
arg4 ((Ptr Cancellable -> IO ()) -> IO ())
-> (Ptr Cancellable -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Cancellable
argPtr4 ->Ptr File
-> CInt
-> Ptr MountOperation
-> Ptr Cancellable
-> GAsyncReadyCallback
-> Ptr ()
-> IO ()
g_file_mount_enclosing_volume Ptr File
argPtr1 CInt
arg2 Ptr MountOperation
argPtr3 Ptr Cancellable
argPtr4 GAsyncReadyCallback
arg5 Ptr ()
arg6)
{-# LINE 1949 "./System/GIO/File/File.chs" #-}
(file -> File
forall o. FileClass o => o -> File
toFile file
file)
((Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt)
-> ([MountMountFlags] -> Int) -> [MountMountFlags] -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. [MountMountFlags] -> Int
forall a. Flags a => [a] -> Int
fromFlags) [MountMountFlags]
flags)
(MountOperation -> Maybe MountOperation -> MountOperation
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr MountOperation -> MountOperation
MountOperation ForeignPtr MountOperation
forall a. ForeignPtr a
nullForeignPtr) Maybe MountOperation
mountOperation)
(Cancellable -> Maybe Cancellable -> Cancellable
forall a. a -> Maybe a -> a
fromMaybe (ForeignPtr Cancellable -> Cancellable
Cancellable ForeignPtr Cancellable
forall a. ForeignPtr a
nullForeignPtr) Maybe Cancellable
cancellable)
GAsyncReadyCallback
cCallback
(GAsyncReadyCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr GAsyncReadyCallback
cCallback)
fileMountEnclosingVolumeFinish :: FileClass file
=> file
-> AsyncResult
-> IO Bool
fileMountEnclosingVolumeFinish :: forall file. FileClass file => file -> AsyncResult -> IO Bool
fileMountEnclosingVolumeFinish file
file AsyncResult
result =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(Ptr (Ptr ()) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr ()) -> IO a) -> IO a
propagateGError ((\(File ForeignPtr File
arg1) (AsyncResult ForeignPtr AsyncResult
arg2) Ptr (Ptr ())
arg3 -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->ForeignPtr AsyncResult -> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr AsyncResult
arg2 ((Ptr AsyncResult -> IO CInt) -> IO CInt)
-> (Ptr AsyncResult -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr AsyncResult
argPtr2 ->Ptr File -> Ptr AsyncResult -> Ptr (Ptr ()) -> IO CInt
g_file_mount_enclosing_volume_finish Ptr File
argPtr1 Ptr AsyncResult
argPtr2 Ptr (Ptr ())
arg3) (file -> File
forall o. FileClass o => o -> File
toFile file
file) AsyncResult
result)
fileSupportsThreadContexts :: FileClass file => file
-> IO Bool
fileSupportsThreadContexts :: forall file. FileClass file => file -> IO Bool
fileSupportsThreadContexts file
file =
(CInt -> Bool) -> IO CInt -> IO Bool
forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM CInt -> Bool
forall a. (Eq a, Num a) => a -> Bool
toBool (IO CInt -> IO Bool) -> IO CInt -> IO Bool
forall a b. (a -> b) -> a -> b
$
(\(File ForeignPtr File
arg1) -> ForeignPtr File -> (Ptr File -> IO CInt) -> IO CInt
forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
withForeignPtr ForeignPtr File
arg1 ((Ptr File -> IO CInt) -> IO CInt)
-> (Ptr File -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ \Ptr File
argPtr1 ->Ptr File -> IO CInt
g_file_supports_thread_contexts Ptr File
argPtr1) (file -> File
forall o. FileClass o => o -> File
toFile file
file)
foreign import ccall safe "g_file_new_for_path"
g_file_new_for_path :: ((Ptr CChar) -> (IO (Ptr File)))
foreign import ccall safe "g_file_new_for_uri"
g_file_new_for_uri :: ((Ptr CChar) -> (IO (Ptr File)))
foreign import ccall safe "g_file_new_for_commandline_arg"
g_file_new_for_commandline_arg :: ((Ptr CChar) -> (IO (Ptr File)))
foreign import ccall safe "g_file_parse_name"
g_file_parse_name :: ((Ptr CChar) -> (IO (Ptr File)))
foreign import ccall safe "g_file_equal"
g_file_equal :: ((Ptr File) -> ((Ptr File) -> (IO CInt)))
foreign import ccall safe "g_file_get_basename"
g_file_get_basename :: ((Ptr File) -> (IO (Ptr CChar)))
foreign import ccall unsafe "g_free"
g_free :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "g_file_get_path"
g_file_get_path :: ((Ptr File) -> (IO (Ptr CChar)))
foreign import ccall safe "g_file_get_uri"
g_file_get_uri :: ((Ptr File) -> (IO (Ptr CChar)))
foreign import ccall safe "g_file_get_parse_name"
g_file_get_parse_name :: ((Ptr File) -> (IO (Ptr CChar)))
foreign import ccall safe "g_file_get_parent"
g_file_get_parent :: ((Ptr File) -> (IO (Ptr File)))
foreign import ccall safe "g_file_has_parent"
g_file_has_parent :: ((Ptr File) -> ((Ptr File) -> (IO CInt)))
foreign import ccall safe "g_file_get_child"
g_file_get_child :: ((Ptr File) -> ((Ptr CChar) -> (IO (Ptr File))))
foreign import ccall safe "g_file_get_child_for_display_name"
g_file_get_child_for_display_name :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr (Ptr ())) -> (IO (Ptr File)))))
foreign import ccall safe "g_file_has_prefix"
g_file_has_prefix :: ((Ptr File) -> ((Ptr File) -> (IO CInt)))
foreign import ccall safe "g_file_get_relative_path"
g_file_get_relative_path :: ((Ptr File) -> ((Ptr File) -> (IO (Ptr CChar))))
foreign import ccall safe "g_file_resolve_relative_path"
g_file_resolve_relative_path :: ((Ptr File) -> ((Ptr CChar) -> (IO (Ptr File))))
foreign import ccall safe "g_file_is_native"
g_file_is_native :: ((Ptr File) -> (IO CInt))
foreign import ccall safe "g_file_has_uri_scheme"
g_file_has_uri_scheme :: ((Ptr File) -> ((Ptr CChar) -> (IO CInt)))
foreign import ccall safe "g_file_get_uri_scheme"
g_file_get_uri_scheme :: ((Ptr File) -> (IO (Ptr CChar)))
foreign import ccall safe "g_file_read"
g_file_read :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInputStream)))))
foreign import ccall safe "g_file_read_async"
g_file_read_async :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))
foreign import ccall safe "g_file_read_finish"
g_file_read_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInputStream)))))
foreign import ccall safe "g_file_append_to"
g_file_append_to :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream))))))
foreign import ccall safe "g_file_create"
g_file_create :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream))))))
foreign import ccall safe "g_file_replace"
g_file_replace :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream))))))))
foreign import ccall safe "g_file_append_to_async"
g_file_append_to_async :: ((Ptr File) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_append_to_finish"
g_file_append_to_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream)))))
foreign import ccall safe "g_file_create_async"
g_file_create_async :: ((Ptr File) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_create_finish"
g_file_create_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream)))))
foreign import ccall safe "g_file_replace_async"
g_file_replace_async :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))))
foreign import ccall safe "g_file_replace_finish"
g_file_replace_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileOutputStream)))))
foreign import ccall safe "g_file_query_info"
g_file_query_info :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInfo)))))))
foreign import ccall safe "g_file_query_info_async"
g_file_query_info_async :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))))
foreign import ccall safe "g_file_query_info_finish"
g_file_query_info_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInfo)))))
foreign import ccall safe "g_file_query_exists"
g_file_query_exists :: ((Ptr File) -> ((Ptr Cancellable) -> (IO CInt)))
foreign import ccall safe "g_file_query_file_type"
g_file_query_file_type :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> (IO CInt))))
foreign import ccall safe "g_file_query_filesystem_info"
g_file_query_filesystem_info :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInfo))))))
foreign import ccall safe "g_file_query_filesystem_info_async"
g_file_query_filesystem_info_async :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_query_filesystem_info_finish"
g_file_query_filesystem_info_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileInfo)))))
foreign import ccall safe "g_file_query_default_handler"
g_file_query_default_handler :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr AppInfo)))))
foreign import ccall safe "g_file_find_enclosing_mount"
g_file_find_enclosing_mount :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr Mount)))))
foreign import ccall safe "g_file_find_enclosing_mount_async"
g_file_find_enclosing_mount_async :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))
foreign import ccall safe "g_file_find_enclosing_mount_finish"
g_file_find_enclosing_mount_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr Mount)))))
foreign import ccall safe "g_file_enumerate_children"
g_file_enumerate_children :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileEnumerator)))))))
foreign import ccall safe "g_file_enumerate_children_async"
g_file_enumerate_children_async :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))))
foreign import ccall safe "g_file_enumerate_children_finish"
g_file_enumerate_children_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr FileEnumerator)))))
foreign import ccall safe "g_file_set_display_name"
g_file_set_display_name :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr File))))))
foreign import ccall safe "g_file_set_display_name_async"
g_file_set_display_name_async :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_set_display_name_finish"
g_file_set_display_name_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr File)))))
foreign import ccall safe "g_file_delete"
g_file_delete :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_trash"
g_file_trash :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_copy"
g_file_copy :: ((Ptr File) -> ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr (CLong -> (CLong -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((Ptr (Ptr ())) -> (IO CInt))))))))
foreign import ccall safe "g_file_copy_async"
g_file_copy_async :: ((Ptr File) -> ((Ptr File) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr (CLong -> (CLong -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))))))
foreign import ccall safe "g_file_copy_finish"
g_file_copy_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_move"
g_file_move :: ((Ptr File) -> ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((FunPtr (CLong -> (CLong -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> ((Ptr (Ptr ())) -> (IO CInt))))))))
foreign import ccall safe "g_file_make_directory"
g_file_make_directory :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_make_directory_with_parents"
g_file_make_directory_with_parents :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_make_symbolic_link"
g_file_make_symbolic_link :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))
foreign import ccall safe "g_file_query_settable_attributes"
g_file_query_settable_attributes :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileAttributeInfoList)))))
foreign import ccall safe "g_file_query_writable_namespaces"
g_file_query_writable_namespaces :: ((Ptr File) -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileAttributeInfoList)))))
foreign import ccall safe "g_file_set_attributes_from_info"
g_file_set_attributes_from_info :: ((Ptr File) -> ((Ptr FileInfo) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))))
foreign import ccall safe "g_file_set_attributes_async"
g_file_set_attributes_async :: ((Ptr File) -> ((Ptr FileInfo) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ()))))))))
foreign import ccall safe "g_file_set_attributes_finish"
g_file_set_attributes_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr FileInfo) -> ((Ptr (Ptr ())) -> (IO CInt)))))
foreign import ccall safe "g_file_set_attribute_string"
g_file_set_attribute_string :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_set_attribute_byte_string"
g_file_set_attribute_byte_string :: ((Ptr File) -> ((Ptr CChar) -> ((Ptr CChar) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_set_attribute_uint32"
g_file_set_attribute_uint32 :: ((Ptr File) -> ((Ptr CChar) -> (CUInt -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_set_attribute_int32"
g_file_set_attribute_int32 :: ((Ptr File) -> ((Ptr CChar) -> (CInt -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_set_attribute_uint64"
g_file_set_attribute_uint64 :: ((Ptr File) -> ((Ptr CChar) -> (CULong -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_set_attribute_int64"
g_file_set_attribute_int64 :: ((Ptr File) -> ((Ptr CChar) -> (CLong -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt)))))))
foreign import ccall safe "g_file_copy_attributes"
g_file_copy_attributes :: ((Ptr File) -> ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO CInt))))))
foreign import ccall safe "g_file_monitor_directory"
g_file_monitor_directory :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileMonitor))))))
foreign import ccall safe "g_file_monitor_file"
g_file_monitor_file :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileMonitor))))))
foreign import ccall safe "g_file_monitor"
g_file_monitor :: ((Ptr File) -> (CInt -> ((Ptr Cancellable) -> ((Ptr (Ptr ())) -> (IO (Ptr FileMonitor))))))
foreign import ccall safe "g_file_mount_mountable"
g_file_mount_mountable :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_mount_mountable_finish"
g_file_mount_mountable_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO (Ptr File)))))
foreign import ccall safe "g_file_unmount_mountable_with_operation"
g_file_unmount_mountable_with_operation :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_unmount_mountable_with_operation_finish"
g_file_unmount_mountable_with_operation_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_eject_mountable_with_operation"
g_file_eject_mountable_with_operation :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_eject_mountable_with_operation_finish"
g_file_eject_mountable_with_operation_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_start_mountable"
g_file_start_mountable :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_start_mountable_finish"
g_file_start_mountable_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_stop_mountable"
g_file_stop_mountable :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_stop_mountable_finish"
g_file_stop_mountable_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_poll_mountable"
g_file_poll_mountable :: ((Ptr File) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))
foreign import ccall safe "g_file_poll_mountable_finish"
g_file_poll_mountable_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_mount_enclosing_volume"
g_file_mount_enclosing_volume :: ((Ptr File) -> (CInt -> ((Ptr MountOperation) -> ((Ptr Cancellable) -> ((FunPtr ((Ptr ()) -> ((Ptr AsyncResult) -> ((Ptr ()) -> (IO ()))))) -> ((Ptr ()) -> (IO ())))))))
foreign import ccall safe "g_file_mount_enclosing_volume_finish"
g_file_mount_enclosing_volume_finish :: ((Ptr File) -> ((Ptr AsyncResult) -> ((Ptr (Ptr ())) -> (IO CInt))))
foreign import ccall safe "g_file_supports_thread_contexts"
g_file_supports_thread_contexts :: ((Ptr File) -> (IO CInt))