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
import System.GIO.Types
import qualified Data.ByteString as BS
type Offset = (CLLong)
type GFileProgressCallback = FunPtr ((CLLong -> (CLLong -> ((Ptr ()) -> (IO ())))))
type FileProgressCallback = Offset -> Offset -> IO ()
foreign import ccall "wrapper" mkFileProgressCallback ::
((CLLong) -> (CLLong) -> Ptr () -> IO ()) -> IO GFileProgressCallback
marshalFileProgressCallback :: FileProgressCallback -> IO GFileProgressCallback
marshalFileProgressCallback fileProgressCallback =
mkFileProgressCallback $ \ cCurrentNumBytes cTotalNumBytes _ -> do
fileProgressCallback
(fromIntegral cCurrentNumBytes)
(fromIntegral cTotalNumBytes)
type FileReadMoreCallback = BS.ByteString -> IO Bool
fileFromPath :: ByteString -> File
fileFromPath path =
unsafePerformIO $ wrapNewGObject mkFile $
useAsCString path $ \cPath -> g_file_new_for_path cPath
fileFromURI :: String -> File
fileFromURI uri =
unsafePerformIO $ wrapNewGObject mkFile $
withUTFString uri $ \cURI -> g_file_new_for_uri cURI
fileFromCommandlineArg :: ByteString -> File
fileFromCommandlineArg arg =
unsafePerformIO $ wrapNewGObject mkFile $
useAsCString arg $ \cArg -> g_file_new_for_commandline_arg cArg
fileFromParseName :: String -> File
fileFromParseName parseName =
unsafePerformIO $ wrapNewGObject mkFile $
withUTFString parseName $ \cParseName -> g_file_parse_name cParseName
fileEqual :: (FileClass file1, FileClass file2)
=> file1 -> file2 -> Bool
fileEqual file1 file2 =
unsafePerformIO $ liftM toBool $ (\(File arg1) (File arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_equal argPtr1 argPtr2) (toFile file1) (toFile file2)
instance Eq File where
(==) = fileEqual
fileBasename :: FileClass file => file -> ByteString
fileBasename file =
unsafePerformIO $ do
sPtr <- (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_basename argPtr1)
(toFile file)
sLen <- lengthArray0 0 sPtr
unsafePackCStringFinalizer (castPtr sPtr) (fromIntegral sLen)
(g_free (castPtr sPtr))
filePath :: FileClass file => file -> ByteString
filePath file =
unsafePerformIO $ do
sPtr <- (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_path argPtr1)
(toFile file)
sLen <- lengthArray0 0 sPtr
unsafePackCStringFinalizer (castPtr sPtr) (fromIntegral sLen)
(g_free (castPtr sPtr))
fileURI :: FileClass file => file -> String
fileURI file =
unsafePerformIO $ (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_uri argPtr1) (toFile file) >>= readUTFString
fileParseName :: FileClass file => file -> String
fileParseName file =
unsafePerformIO $ (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_parse_name argPtr1) (toFile file) >>= readUTFString
fileParent :: FileClass file => file -> Maybe File
fileParent file =
unsafePerformIO $ maybeNull (wrapNewGObject mkFile) $
(\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_parent argPtr1) (toFile file)
fileHasParent :: FileClass file => file -> Maybe File -> Bool
fileHasParent file parent =
unsafePerformIO $ liftM toBool $
(\(File arg1) (File arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_has_parent argPtr1 argPtr2)
(toFile file)
(fromMaybe (File nullForeignPtr) parent)
fileGetChild :: FileClass file => file -> ByteString -> File
fileGetChild file name =
unsafePerformIO $ wrapNewGObject mkFile $
useAsCString name $ \cName ->
(\(File arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_child argPtr1 arg2) (toFile file) cName
fileGetChildForDisplayName :: FileClass file => file -> String -> File
fileGetChildForDisplayName file displayName =
unsafePerformIO $ (wrapNewGObject mkFile) $
withUTFString displayName $ \cDisplayName ->
propagateGError ((\(File arg1) arg2 arg3 -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_child_for_display_name argPtr1 arg2 arg3) (toFile file) cDisplayName)
fileHasPrefix :: (FileClass file1, FileClass file2) => file1 -> file2 -> Bool
fileHasPrefix file1 file2 =
unsafePerformIO $
liftM toBool $ (\(File arg1) (File arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_has_prefix argPtr1 argPtr2) (toFile file1) (toFile file2)
fileGetRelativePath :: (FileClass file1, FileClass file2) => file1 -> file2 -> Maybe ByteString
fileGetRelativePath file1 file2 =
unsafePerformIO $ do
sPtr <- (\(File arg1) (File arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_get_relative_path argPtr1 argPtr2) (toFile file1) (toFile file2)
if sPtr == nullPtr
then return Nothing
else do
sLen <- lengthArray0 0 sPtr
liftM Just $ unsafePackCStringFinalizer (castPtr sPtr) (fromIntegral sLen)
(g_free (castPtr sPtr))
fileResolveRelativePath :: FileClass file => file -> ByteString -> Maybe File
fileResolveRelativePath file relativePath =
unsafePerformIO $ maybeNull (wrapNewGObject mkFile) $
useAsCString relativePath $ \cRelativePath ->
(\(File arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->g_file_resolve_relative_path argPtr1 arg2) (toFile file) cRelativePath
fileIsNative :: FileClass file => file -> Bool
fileIsNative =
unsafePerformIO .
liftM toBool . (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_is_native argPtr1) . toFile
fileHasURIScheme :: FileClass file => file -> String -> Bool
fileHasURIScheme file uriScheme =
unsafePerformIO $
withUTFString uriScheme $ \cURIScheme ->
liftM toBool $ (\(File arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->g_file_has_uri_scheme argPtr1 arg2) (toFile file) cURIScheme
fileURIScheme :: FileClass file => file -> String
fileURIScheme file =
unsafePerformIO $ (\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_get_uri_scheme argPtr1) (toFile file) >>= readUTFString
fileRead :: FileClass file => file -> Maybe Cancellable -> IO FileInputStream
fileRead file cancellable =
wrapNewGObject mkFileInputStream $
propagateGError ((\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_read argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable))
fileReadAsync :: FileClass file
=> file
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileReadAsync file ioPriority mbCancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (Cancellable arg3) arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_read_async argPtr1 arg2 argPtr3 arg4 arg5)
(toFile file)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) mbCancellable)
cCallback
(castFunPtrToPtr cCallback)
fileReadFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInputStream
fileReadFinish file asyncResult =
wrapNewGObject mkFileInputStream $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_read_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileAppendTo :: FileClass file
=> file
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileAppendTo file flags cancellable =
wrapNewGObject mkFileOutputStream $
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_append_to argPtr1 arg2 argPtr3 arg4)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileCreate :: FileClass file
=> file
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileCreate file flags cancellable =
wrapNewGObject mkFileOutputStream $
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_create argPtr1 arg2 argPtr3 arg4)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileReplace :: FileClass file
=> file
-> Maybe String
-> Bool
-> [FileCreateFlags]
-> Maybe Cancellable
-> IO FileOutputStream
fileReplace file etag makeBackup flags cancellable =
wrapNewGObject mkFileOutputStream $
maybeWith withUTFString etag $ \cEtag ->
propagateGError ((\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_replace argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
cEtag
(fromBool makeBackup)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable))
fileAppendToAsync :: FileClass file
=> file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileAppendToAsync file flags ioPriority cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_append_to_async argPtr1 arg2 arg3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileAppendToFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileAppendToFinish file asyncResult =
wrapNewGObject mkFileOutputStream $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_append_to_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileCreateAsync :: FileClass file
=> file
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileCreateAsync file flags ioPriority cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_create_async argPtr1 arg2 arg3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileCreateFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileCreateFinish file asyncResult =
wrapNewGObject mkFileOutputStream $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_create_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileReplaceAsync :: FileClass file
=> file
-> String
-> Bool
-> [FileCreateFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileReplaceAsync file etag makeBackup flags ioPriority cancellable callback =
withUTFString etag $ \cEtag -> do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 arg4 arg5 (Cancellable arg6) arg7 arg8 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg6 $ \argPtr6 ->g_file_replace_async argPtr1 arg2 arg3 arg4 arg5 argPtr6 arg7 arg8)
(toFile file)
cEtag
(fromBool makeBackup)
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileReplaceFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileOutputStream
fileReplaceFinish file asyncResult =
wrapNewGObject mkFileOutputStream $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_replace_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileQueryInfo :: FileClass file
=> file
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileInfo
fileQueryInfo file attributes flags cancellable =
makeNewGObject mkFileInfo $
withUTFString attributes $ \cAttributes ->
propagateGError ((\(File arg1) arg2 arg3 (Cancellable arg4) arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_query_info argPtr1 arg2 arg3 argPtr4 arg5)
(toFile file)
cAttributes
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileQueryInfoAsync :: FileClass file
=> file
-> String
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryInfoAsync file attributes flags ioPriority cancellable callback =
withUTFString attributes $ \cAttributes -> do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 arg7 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_query_info_async argPtr1 arg2 arg3 arg4 argPtr5 arg6 arg7)
(toFile file)
cAttributes
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileQueryInfoFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInfo
fileQueryInfoFinish file asyncResult =
makeNewGObject mkFileInfo $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_info_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileQueryExists :: FileClass file
=> file
-> Maybe Cancellable
-> Bool
fileQueryExists file cancellable =
unsafePerformIO $
liftM toBool $
(\(File arg1) (Cancellable arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_exists argPtr1 argPtr2)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
fileQueryFileType :: FileClass file
=> file
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> FileType
fileQueryFileType file flags cancellable =
(toEnum . fromIntegral) $
unsafePerformIO $
((\(File arg1) arg2 (Cancellable arg3) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_query_file_type argPtr1 arg2 argPtr3)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable) )
fileQueryFilesystemInfo :: FileClass file
=> file
-> String
-> Maybe Cancellable
-> IO FileInfo
fileQueryFilesystemInfo file attributes cancellable =
makeNewGObject mkFileInfo $
withUTFString attributes $ \cAttributes ->
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_query_filesystem_info argPtr1 arg2 argPtr3 arg4)
(toFile file)
cAttributes
(fromMaybe (Cancellable nullForeignPtr) cancellable) )
fileQueryFilesystemInfoAsync :: FileClass file
=> file
-> String
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileQueryFilesystemInfoAsync file attributes ioPriority cancellable callback =
withUTFString attributes $ \cAttributes -> do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_query_filesystem_info_async argPtr1 arg2 arg3 argPtr4 arg5 arg6)
(toFile file)
cAttributes
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileQueryFilesystemInfoFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileInfo
fileQueryFilesystemInfoFinish file asyncResult =
makeNewGObject mkFileInfo $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_filesystem_info_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileQueryDefaultHandler :: FileClass file
=> file
-> Maybe Cancellable
-> IO AppInfo
fileQueryDefaultHandler file cancellable =
wrapNewGObject mkAppInfo $
propagateGError ((\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_default_handler argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable) )
fileFindEnclosingMount :: FileClass file
=> file
-> Maybe Cancellable
-> IO Mount
fileFindEnclosingMount file cancellable =
wrapNewGObject mkMount $
propagateGError ((\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_find_enclosing_mount argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileFindEnclosingMountAsync :: FileClass file
=> file
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileFindEnclosingMountAsync file ioPriority cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (Cancellable arg3) arg4 arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_find_enclosing_mount_async argPtr1 arg2 argPtr3 arg4 arg5)
(toFile file)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileFindEnclosingMountFinish :: FileClass file
=> file
-> AsyncResult
-> IO Mount
fileFindEnclosingMountFinish file asyncResult =
wrapNewGObject mkMount $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_find_enclosing_mount_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileEnumerateChildren :: FileClass file
=> file
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO FileEnumerator
fileEnumerateChildren file attributes flags cancellable =
wrapNewGObject mkFileEnumerator $
withCString attributes $ \cAttributes ->
propagateGError ((\(File arg1) arg2 arg3 (Cancellable arg4) arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_enumerate_children argPtr1 arg2 arg3 argPtr4 arg5)
(toFile file)
cAttributes
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileEnumerateChildrenAsync :: FileClass file
=> file
-> String
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEnumerateChildrenAsync file attributes flags ioPriority cancellable callback =
withUTFString attributes $ \cAttributes -> do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 arg7 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_enumerate_children_async argPtr1 arg2 arg3 arg4 argPtr5 arg6 arg7)
(toFile file)
cAttributes
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileEnumerateChildrenFinish :: FileClass file
=> file
-> AsyncResult
-> IO FileEnumerator
fileEnumerateChildrenFinish file asyncResult =
wrapNewGObject mkFileEnumerator $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_enumerate_children_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileSetDisplayName :: FileClass file
=> file
-> String
-> Maybe Cancellable
-> IO File
fileSetDisplayName file displayName cancellable =
wrapNewGObject mkFile $
withUTFString displayName $ \cDisplayName ->
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_set_display_name argPtr1 arg2 argPtr3 arg4)
(toFile file)
cDisplayName
(fromMaybe (Cancellable nullForeignPtr) cancellable) )
fileSetDisplayNameAsync :: FileClass file
=> file
-> String
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetDisplayNameAsync file displayName ioPriority cancellable callback =
withUTFString displayName $ \cDisplayName -> do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 arg3 (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg4 $ \argPtr4 ->g_file_set_display_name_async argPtr1 arg2 arg3 argPtr4 arg5 arg6)
(toFile file)
cDisplayName
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileSetDisplayNameFinish :: FileClass file
=> file
-> AsyncResult
-> IO File
fileSetDisplayNameFinish file asyncResult =
wrapNewGObject mkFile $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_set_display_name_finish argPtr1 argPtr2 arg3) (toFile file) asyncResult)
fileDelete :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileDelete file cancellable =
propagateGError ((\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_delete argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
) >> return ()
fileTrash :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileTrash file cancellable =
propagateGError ((\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_trash argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
) >> return ()
fileCopy :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileCopy source destination flags cancellable progressCallback = do
cProgressCallback <- maybe (return nullFunPtr) marshalFileProgressCallback progressCallback
propagateGError $ \cError -> do
(\(File arg1) (File arg2) arg3 (Cancellable arg4) arg5 arg6 arg7 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg4 $ \argPtr4 ->g_file_copy argPtr1 argPtr2 arg3 argPtr4 arg5 arg6 arg7)
(toFile source)
(toFile destination)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cProgressCallback
nullPtr
cError
when (cProgressCallback /= nullFunPtr) $
freeHaskellFunPtr cProgressCallback
fileCopyAsync :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Int
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> AsyncReadyCallback
-> IO ()
fileCopyAsync source destination flags ioPriority cancellable progressCallback callback = do
cProgressCallback <- maybe (return nullFunPtr) marshalFileProgressCallback progressCallback
cCallback <- marshalAsyncReadyCallback $ \sourceObject res -> do
when (cProgressCallback /= nullFunPtr) $
freeHaskellFunPtr cProgressCallback
callback sourceObject res
(\(File arg1) (File arg2) arg3 arg4 (Cancellable arg5) arg6 arg7 arg8 arg9 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg5 $ \argPtr5 ->g_file_copy_async argPtr1 argPtr2 arg3 arg4 argPtr5 arg6 arg7 arg8 arg9)
(toFile source)
(toFile destination)
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cProgressCallback
nullPtr
cCallback
(castFunPtrToPtr cCallback)
fileCopyFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileCopyFinish file asyncResult =
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_copy_finish argPtr1 argPtr2 arg3)
(toFile file)
asyncResult
gErrorPtr
return ())
fileMove :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> Maybe FileProgressCallback
-> IO ()
fileMove source destination flags cancellable progressCallback = do
cProgressCallback <- maybe (return nullFunPtr) marshalFileProgressCallback progressCallback
propagateGError $ \cError -> do
(\(File arg1) (File arg2) arg3 (Cancellable arg4) arg5 arg6 arg7 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg4 $ \argPtr4 ->g_file_move argPtr1 argPtr2 arg3 argPtr4 arg5 arg6 arg7)
(toFile source)
(toFile destination)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cProgressCallback
nullPtr
cError
when (cProgressCallback /= nullFunPtr) $
freeHaskellFunPtr cProgressCallback
fileMakeDirectory :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileMakeDirectory file cancellable = do
propagateGError $ (\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_make_directory argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
return ()
fileMakeDirectoryWithParents :: FileClass file
=> file
-> Maybe Cancellable
-> IO ()
fileMakeDirectoryWithParents file cancellable = do
propagateGError $ (\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_make_directory_with_parents argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
return ()
fileMakeSymbolicLink :: FileClass file
=> file
-> ByteString
-> Maybe Cancellable
-> IO ()
fileMakeSymbolicLink file symlinkValue cancellable =
useAsCString symlinkValue $ \cSymlinkValue -> do
propagateGError $ (\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_make_symbolic_link argPtr1 arg2 argPtr3 arg4)
(toFile file)
cSymlinkValue
(fromMaybe (Cancellable nullForeignPtr) cancellable)
return ()
newtype FileAttributeInfoList = FileAttributeInfoList (Ptr (FileAttributeInfoList))
takeFileAttributeInfoList :: Ptr FileAttributeInfoList
-> IO [FileAttributeInfo]
takeFileAttributeInfoList ptr =
do cInfos <- liftM castPtr $ (\ptr -> do {peekByteOff ptr 0 ::IO (Ptr ())}) ptr
cNInfos <- (\ptr -> do {peekByteOff ptr 4 ::IO CInt}) ptr
infos <- peekArray (fromIntegral cNInfos) cInfos
return infos
fileQuerySettableAttributes :: FileClass file
=> file
-> Maybe Cancellable
-> IO [FileAttributeInfo]
fileQuerySettableAttributes file cancellable = do
ptr <- propagateGError $
(\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_settable_attributes argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
infos <- takeFileAttributeInfoList ptr
return infos
fileQueryWritableNamespaces :: FileClass file
=> file
-> Maybe Cancellable
-> IO [FileAttributeInfo]
fileQueryWritableNamespaces file cancellable = do
ptr <- propagateGError $
(\(File arg1) (Cancellable arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_query_writable_namespaces argPtr1 argPtr2 arg3)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
infos <- takeFileAttributeInfoList ptr
return infos
fileSetAttributesFromInfo :: FileClass file => file
-> FileInfo
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributesFromInfo file fileInfo flags cancellable =
propagateGError (\gErrorPtr -> do
(\(File arg1) (FileInfo arg2) arg3 (Cancellable arg4) arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg4 $ \argPtr4 ->g_file_set_attributes_from_info argPtr1 argPtr2 arg3 argPtr4 arg5)
(toFile file)
(toFileInfo fileInfo)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributesFromInfoAsync :: FileClass file => file
-> FileInfo
-> [FileQueryInfoFlags]
-> Int
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileSetAttributesFromInfoAsync file fileInfo flags ioPriority cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) (FileInfo arg2) arg3 arg4 (Cancellable arg5) arg6 arg7 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attributes_async argPtr1 argPtr2 arg3 arg4 argPtr5 arg6 arg7)
(toFile file)
(toFileInfo fileInfo)
((fromIntegral . fromFlags) flags)
(fromIntegral ioPriority)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileSetAttributesFinish :: FileClass file
=> file
-> AsyncResult
-> FileInfo
-> IO ()
fileSetAttributesFinish file asyncResult fileInfo =
withForeignPtr (unFileInfo fileInfo) $ \cFileInfo ->
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_set_attributes_finish argPtr1 argPtr2 arg3 arg4)
(toFile file)
asyncResult
cFileInfo
gErrorPtr
return ())
fileSetAttributeString :: FileClass file => file
-> String
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeString file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
withUTFString value $ \ valuePtr -> do
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_string argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
valuePtr
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributeByteString :: FileClass file => file
-> String
-> String
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeByteString file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
withUTFString value $ \ valuePtr -> do
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_byte_string argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
valuePtr
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributeWord32 :: FileClass file => file
-> String
-> Word32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord32 file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_uint32 argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
(fromIntegral value)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributeInt32 :: FileClass file => file
-> String
-> Int32
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt32 file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_int32 argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
(fromIntegral value)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributeWord64 :: FileClass file => file
-> String
-> Word64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeWord64 file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_uint64 argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
(fromIntegral value)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileSetAttributeInt64 :: FileClass file => file
-> String
-> Int64
-> [FileQueryInfoFlags]
-> Maybe Cancellable
-> IO ()
fileSetAttributeInt64 file attribute value flags cancellable =
withUTFString attribute $ \ attributePtr ->
propagateGError (\gErrorPtr -> do
(\(File arg1) arg2 arg3 arg4 (Cancellable arg5) arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg5 $ \argPtr5 ->g_file_set_attribute_int64 argPtr1 arg2 arg3 arg4 argPtr5 arg6)
(toFile file)
attributePtr
(fromIntegral value)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileCopyAttributes :: (FileClass source, FileClass destination)
=> source
-> destination
-> [FileCopyFlags]
-> Maybe Cancellable
-> IO ()
fileCopyAttributes source destination flags cancellable =
propagateGError (\gErrorPtr -> do
(\(File arg1) (File arg2) arg3 (Cancellable arg4) arg5 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->withForeignPtr arg4 $ \argPtr4 ->g_file_copy_attributes argPtr1 argPtr2 arg3 argPtr4 arg5)
(toFile source)
(toFile destination)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
gErrorPtr
return ())
fileMonitorDirectory :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitorDirectory file flags cancellable =
wrapNewGObject mkFileMonitor $
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_monitor_directory argPtr1 arg2 argPtr3 arg4)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileMonitorFile :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitorFile file flags cancellable =
wrapNewGObject mkFileMonitor $
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_monitor_file argPtr1 arg2 argPtr3 arg4)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileMonitor :: FileClass file
=> file
-> [FileMonitorFlags]
-> Maybe Cancellable
-> IO FileMonitor
fileMonitor file flags cancellable =
wrapNewGObject mkFileMonitor $
propagateGError ((\(File arg1) arg2 (Cancellable arg3) arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->g_file_monitor argPtr1 arg2 argPtr3 arg4)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
)
fileMountMountable :: FileClass file => file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountMountable file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_mount_mountable argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileMountMountableFinish :: FileClass file => file
-> AsyncResult
-> IO File
fileMountMountableFinish file result =
wrapNewGObject mkFile $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_mount_mountable_finish argPtr1 argPtr2 arg3) (toFile file) result)
fileUnmountMountableWithOperation :: FileClass file => file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileUnmountMountableWithOperation file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_unmount_mountable_with_operation argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileUnmountMountableWithOperationFinish :: FileClass file => file
-> AsyncResult
-> IO ()
fileUnmountMountableWithOperationFinish file result =
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_unmount_mountable_with_operation_finish argPtr1 argPtr2 arg3)
(toFile file)
result
gErrorPtr
return ())
fileEjectMountableWithOperation :: FileClass file => file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileEjectMountableWithOperation file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_eject_mountable_with_operation argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileEjectMountableWithOperationFinish :: FileClass file => file
-> AsyncResult
-> IO ()
fileEjectMountableWithOperationFinish file result =
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_eject_mountable_with_operation_finish argPtr1 argPtr2 arg3)
(toFile file)
result
gErrorPtr
return ())
fileStartMountable :: FileClass file
=> file
-> [DriveStartFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStartMountable file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_start_mountable argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileStartMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileStartMountableFinish file result =
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_start_mountable_finish argPtr1 argPtr2 arg3)
(toFile file)
result
gErrorPtr
return ())
fileStopMountable :: FileClass file
=> file
-> [MountUnmountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileStopMountable file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_stop_mountable argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileStopMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO ()
fileStopMountableFinish file result =
propagateGError (\gErrorPtr -> do
(\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_stop_mountable_finish argPtr1 argPtr2 arg3)
(toFile file)
result
gErrorPtr
return ())
filePollMountable :: FileClass file => file
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
filePollMountable file cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) (Cancellable arg2) arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_poll_mountable argPtr1 argPtr2 arg3 arg4)
(toFile file)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
filePollMountableFinish :: FileClass file
=> file
-> AsyncResult
-> IO Bool
filePollMountableFinish file result =
liftM toBool $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_poll_mountable_finish argPtr1 argPtr2 arg3) (toFile file) result)
fileMountEnclosingVolume :: FileClass file => file
-> [MountMountFlags]
-> Maybe MountOperation
-> Maybe Cancellable
-> AsyncReadyCallback
-> IO ()
fileMountEnclosingVolume file flags mountOperation cancellable callback = do
cCallback <- marshalAsyncReadyCallback callback
(\(File arg1) arg2 (MountOperation arg3) (Cancellable arg4) arg5 arg6 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg3 $ \argPtr3 ->withForeignPtr arg4 $ \argPtr4 ->g_file_mount_enclosing_volume argPtr1 arg2 argPtr3 argPtr4 arg5 arg6)
(toFile file)
((fromIntegral . fromFlags) flags)
(fromMaybe (MountOperation nullForeignPtr) mountOperation)
(fromMaybe (Cancellable nullForeignPtr) cancellable)
cCallback
(castFunPtrToPtr cCallback)
fileMountEnclosingVolumeFinish :: FileClass file
=> file
-> AsyncResult
-> IO Bool
fileMountEnclosingVolumeFinish file result =
liftM toBool $
propagateGError ((\(File arg1) (AsyncResult arg2) arg3 -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_file_mount_enclosing_volume_finish argPtr1 argPtr2 arg3) (toFile file) result)
fileSupportsThreadContexts :: FileClass file => file
-> IO Bool
fileSupportsThreadContexts file =
liftM toBool $
(\(File arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_file_supports_thread_contexts argPtr1) (toFile 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 (CLLong -> (CLLong -> ((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 (CLLong -> (CLLong -> ((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 (CLLong -> (CLLong -> ((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) -> (CULLong -> (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) -> (CLLong -> (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))