From: Andy S. <And...@co...> - 2010-08-15 19:11:26
|
diffing dir... Sun Aug 15 14:13:50 EDT 2010 Andy Stewart <laz...@gm...> * Update System.GIO.File module Ignore-this: ff018efa91ad990ddfdb017c1ede3e6a { hunk ./gio/System/GIO/File/File.chs 34 --- | GFile is a high level abstraction for manipulating files on a virtual file system. GFiles are +-- | 'File' is a high level abstraction for manipulating files on a virtual file system. 'File's are hunk ./gio/System/GIO/File/File.chs 36 --- GFile objects do not represent files, merely an identifier for a file. All file content I/O is +-- 'File' objects do not represent files, merely an identifier for a file. All file content I/O is hunk ./gio/System/GIO/File/File.chs 39 --- To construct a GFile, you can use: 'fileNewForPath' if +-- To construct a 'File', you can use: 'fileNewForPath' if hunk ./gio/System/GIO/File/File.chs 43 --- One way to think of a GFile is as an abstraction of a pathname. For normal files the system pathname --- is what is stored internally, but as GFiles are extensible it could also be something else that +-- One way to think of a 'File' is as an abstraction of a pathname. For normal files the system pathname +-- is what is stored internally, but as 'File's are extensible it could also be something else that hunk ./gio/System/GIO/File/File.chs 47 --- GFiles make up hierarchies of directories and files that correspond to the files on a --- filesystem. You can move through the file system with GFile using 'fileGetParent' to get an +-- 'File's make up hierarchies of directories and files that correspond to the files on a +-- filesystem. You can move through the file system with 'File' using 'fileGetParent' to get an hunk ./gio/System/GIO/File/File.chs 50 --- 'fileResolveRelativePath' to resolve a relative path between two GFiles. There can be multiple +-- 'fileResolveRelativePath' to resolve a relative path between two 'File's. There can be multiple hunk ./gio/System/GIO/File/File.chs 54 --- All GFiles have a basename (get with 'fileGetBasename'. These names are byte strings that are +-- All 'File's have a basename (get with 'fileGetBasename'. These names are byte strings that are hunk ./gio/System/GIO/File/File.chs 58 --- the GFileAttributeStandardDisplayName attribute with 'fileQueryInfo'. This is guaranteed to --- be in utf8 and can be used in a user interface. But always store the real basename or the GFile to +-- the 'FileAttributeStandardDisplayName' attribute with 'fileQueryInfo'. This is guaranteed to +-- be in utf8 and can be used in a user interface. But always store the real basename or the 'File' to hunk ./gio/System/GIO/File/File.chs 63 --- Using GFile as an identifier has the same weaknesses as using a path in that there may be multiple --- aliases for the same file. For instance, hard or soft links may cause two different GFiles to refer +-- Using 'File' as an identifier has the same weaknesses as using a path in that there may be multiple +-- aliases for the same file. For instance, hard or soft links may cause two different 'File's to refer hunk ./gio/System/GIO/File/File.chs 66 --- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two GFiles point to the --- same file you can query for the GFileAttributeIdFile attribute. Note that GFile does some +-- long names on Fat/NTFS, or bind mounts in Linux. If you want to check if two 'File's point to the +-- same file you can query for the 'FileAttributeIdFile' attribute. Note that 'File' does some hunk ./gio/System/GIO/File/File.chs 70 --- create different GFiles. +-- create different 'File's. hunk ./gio/System/GIO/File/File.chs 72 --- Many GFile operations have both synchronous and asynchronous versions to suit your +-- Many 'File' operations have both synchronous and asynchronous versions to suit your hunk ./gio/System/GIO/File/File.chs 74 --- function names. The asynchronous I/O functions call a GAsyncReadyCallback which is then used to --- finalize the operation, producing a GAsyncResult which is then passed to the function's matching +-- function names. The asynchronous I/O functions call a 'AsyncReadyCallback' which is then used to +-- finalize the operation, producing a 'AsyncResult' which is then passed to the function's matching hunk ./gio/System/GIO/File/File.chs 78 --- Some GFile operations do not have synchronous analogs, as they may take a very long time to finish, +-- Some 'File' operations do not have synchronous analogs, as they may take a very long time to finish, hunk ./gio/System/GIO/File/File.chs 83 --- One notable feature of GFiles are entity tags, or "etags" for short. Entity tags are somewhat like a +-- One notable feature of 'File's are entity tags, or "etags" for short. Entity tags are somewhat like a hunk ./gio/System/GIO/File/File.chs 89 + File(..), + FileClass, hunk ./gio/System/GIO/File/File.chs 93 - FileClass, + 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, hunk ./gio/System/GIO/File/File.chs 120 - File(..), - FileQueryInfoFlags(..), - FileCreateFlags(..), - FileCopyFlags(..), - FileMonitorFlags(..), - FilesystemPreviewType(..), - FileType(..), + FileType (..), + FileCopyFlags (..), + FileQueryInfoFlags (..), + FileCreateFlags (..), + FileMonitorFlags (..), + MountMountFlags (..), + MountUnmountFlags (..), hunk ./gio/System/GIO/File/File.chs 193 - fileQueryWritableNamespaces + fileQueryWritableNamespaces, + + fileSetAttributesFromInfo, + fileSetAttributesFromInfoAsync, + fileSetAttributesFinish, + fileSetAttributeString, + fileSetAttributeByteString, + fileSetAttributeWord32, + fileSetAttributeInt32, + fileSetAttributeWord64, + fileSetAttributeInt64, + fileCopyAttributes, + + fileMonitorDirectory, + fileMonitorFile, +#if GLIB_CHECK_VERSION(2,18,0) + fileMonitor, +#endif + + fileMountMountable, + fileMountMountableFinish, +#if GLIB_CHECK_VERSION(2,22,0) + fileUnmountMountableWithOperation, + fileUnmountMountableWithOperationFinish, + fileEjectMountableWithOperation, + fileEjectMountableWithOperationFinish, + fileStartMountable, + fileStartMountableFinish, + fileStopMountable, + fileStopMountableFinish, + filePollMountable, + filePollMountableFinish, + fileMountEnclosingVolume, + fileMountEnclosingVolumeFinish, + fileSupportsThreadContexts, +#endif hunk ./gio/System/GIO/File/File.chs 232 -import qualified Data.ByteString as BS hunk ./gio/System/GIO/File/File.chs 233 - +import System.GIO.Enums +import System.GIO.File.FileAttribute hunk ./gio/System/GIO/File/File.chs 238 -import System.Glib.UTFString hunk ./gio/System/GIO/File/File.chs 239 - +import System.Glib.UTFString +{#import System.GIO.Async.AsyncResult#} hunk ./gio/System/GIO/File/File.chs 243 -import System.GIO.File.FileAttribute hunk ./gio/System/GIO/File/File.chs 244 -{# context lib = "gio" prefix = "g" #} - -{# enum GFileQueryInfoFlags as FileQueryInfoFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileQueryInfoFlags - -{# enum GFileCreateFlags as FileCreateFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileCreateFlags - -{# enum GFileCopyFlags as FileCopyFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileCopyFlags +import qualified Data.ByteString as BS hunk ./gio/System/GIO/File/File.chs 246 -{# enum GFileMonitorFlags as FileMonitorFlags {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} -instance Flags FileMonitorFlags +{# context lib = "gio" prefix = "g" #} hunk ./gio/System/GIO/File/File.chs 248 -{# enum GFilesystemPreviewType as FilesystemPreviewType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +type Offset = {# type goffset #} hunk ./gio/System/GIO/File/File.chs 250 -{# enum GFileType as FileType {underscoreToCase} with prefix = "G" deriving (Eq, Ord, Bounded, Show, Typeable) #} +{#pointer GFileProgressCallback #} hunk ./gio/System/GIO/File/File.chs 253 -type CFileProgressCallback = {# type goffset #} -> {# type goffset #} -> Ptr () -> IO () -foreign import ccall "wrapper" - makeFileProgressCallback :: CFileProgressCallback - -> IO {# type GFileProgressCallback #} hunk ./gio/System/GIO/File/File.chs 254 -marshalFileProgressCallback :: FileProgressCallback -> IO {# type GFileProgressCallback #} +foreign import ccall "wrapper" mkFileProgressCallback :: + ({#type goffset #} -> {#type goffset #} -> Ptr () -> IO ()) -> IO GFileProgressCallback + +marshalFileProgressCallback :: FileProgressCallback -> IO GFileProgressCallback hunk ./gio/System/GIO/File/File.chs 259 - makeFileProgressCallback cFileProgressCallback - where cFileProgressCallback :: CFileProgressCallback - cFileProgressCallback cCurrentNumBytes cTotalNumBytes _ = do - fileProgressCallback (fromIntegral cCurrentNumBytes) - (fromIntegral cTotalNumBytes) + mkFileProgressCallback $ \ cCurrentNumBytes cTotalNumBytes _ -> do + fileProgressCallback [_$_] + (fromIntegral cCurrentNumBytes) + (fromIntegral cTotalNumBytes) hunk ./gio/System/GIO/File/File.chs 266 --- | Constructs a GFile for a given path. This operation never fails, but the returned object might not +-- | Constructs a 'File' for a given path. This operation never fails, but the returned object might not hunk ./gio/System/GIO/File/File.chs 270 - unsafePerformIO $ withUTFString path $ \cPath -> {# call file_new_for_path #} cPath >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString path $ \cPath -> {# call file_new_for_path #} cPath hunk ./gio/System/GIO/File/File.chs 273 --- | Constructs a GFile for a given URI. This operation never fails, but the returned object might not +-- | Constructs a 'File' for a given URI. This operation never fails, but the returned object might not hunk ./gio/System/GIO/File/File.chs 277 - unsafePerformIO $ withUTFString uri $ \cURI -> {# call file_new_for_uri #} cURI >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString uri $ \cURI -> {# call file_new_for_uri #} cURI [_$_] hunk ./gio/System/GIO/File/File.chs 280 --- | Creates a GFile with the given argument from the command line. The value of arg can be either a URI, +-- | Creates a 'File' with the given argument from the command line. The value of arg can be either a URI, hunk ./gio/System/GIO/File/File.chs 286 - unsafePerformIO $ withUTFString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString arg $ \cArg -> {# call file_new_for_commandline_arg #} cArg [_$_] hunk ./gio/System/GIO/File/File.chs 289 --- | Constructs a GFile with the given 'name (i.e. something given by gFileGetParseName'. This +-- | Constructs a 'File' with the given name (i.e. something given by 'fileParseName'. This hunk ./gio/System/GIO/File/File.chs 294 - unsafePerformIO $ withUTFString parseName $ \cParseName -> {# call file_parse_name #} cParseName >>= takeGObject + unsafePerformIO $ constructNewGObject mkFile $ [_$_] + withUTFString parseName $ \cParseName -> {# call file_parse_name #} cParseName [_$_] hunk ./gio/System/GIO/File/File.chs 309 --- | Gets the base name (the last component of the path) for a given GFile. +-- | Gets the base name (the last component of the path) for a given 'File'. hunk ./gio/System/GIO/File/File.chs 316 --- name that you can get by requesting the GFileAttributeStandardDisplayName attribute with +-- name that you can get by requesting the 'FileAttributeStandardDisplayName' attribute with hunk ./gio/System/GIO/File/File.chs 322 - unsafePerformIO $ {# call file_get_basename #} (toFile file) >>= readUTFString + unsafePerformIO $ {# call file_get_basename #} (toFile file) >>= readCString hunk ./gio/System/GIO/File/File.chs 324 --- | Gets the local pathname for GFile, if one exists. +-- | Gets the local pathname for 'File', if one exists. hunk ./gio/System/GIO/File/File.chs 339 --- one can get the GFile back using 'fileParseName'. +-- one can get the 'File' back using 'fileParseName'. hunk ./gio/System/GIO/File/File.chs 341 --- This is generally used to show the GFile as a nice full-pathname kind of string in a user interface, +-- This is generally used to show the 'File' as a nice full-pathname kind of string in a user interface, hunk ./gio/System/GIO/File/File.chs 358 - unsafePerformIO $ {# call file_get_parent #} (toFile file) >>= maybePeek takeGObject + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ [_$_] + {# call file_get_parent #} (toFile file) [_$_] hunk ./gio/System/GIO/File/File.chs 377 --- Note that the file with that specific name might not exist, but you can still have a GFile that +-- Note that the file with that specific name might not exist, but you can still have a 'File' that hunk ./gio/System/GIO/File/File.chs 383 - unsafePerformIO $ + unsafePerformIO $ makeNewGObject mkFile $ hunk ./gio/System/GIO/File/File.chs 385 - {# call file_get_child #} (toFile file) cName >>= takeGObject + {# call file_get_child #} (toFile file) cName hunk ./gio/System/GIO/File/File.chs 388 --- fails, it returns 'Nothing' and error will be set. This is very useful when constructing a GFile for a +-- fails, it returns 'Nothing' and error will be set. This is very useful when constructing a 'File' for a hunk ./gio/System/GIO/File/File.chs 395 - unsafePerformIO $ + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ hunk ./gio/System/GIO/File/File.chs 397 - propagateGError ({# call file_get_child_for_display_name #} (toFile file) cDisplayName) >>= - maybePeek takeGObject + propagateGError ({# call file_get_child_for_display_name #} (toFile file) cDisplayName) hunk ./gio/System/GIO/File/File.chs 425 - unsafePerformIO $ + unsafePerformIO $ maybeNull (makeNewGObject mkFile) $ hunk ./gio/System/GIO/File/File.chs 427 - {# call file_resolve_relative_path #} (toFile file) cRelativePath >>= - maybePeek takeGObject + {# call file_resolve_relative_path #} (toFile file) cRelativePath hunk ./gio/System/GIO/File/File.chs 431 --- A native file s one expressed in the platform-native filename format, e.g. \"C:\\Windows\" or +-- A native file s one expressed in the platform-native filename format, e.g. \"C:\Windows\" or hunk ./gio/System/GIO/File/File.chs 436 --- filesystem (FUSE), in these cases this call will return @False@, but 'fileGetPath' will still +-- filesystem (FUSE), in these cases this call will return 'False', but 'fileGetPath' will still hunk ./gio/System/GIO/File/File.chs 445 --- | Checks to see if a 'GFile' has a given URI scheme. +-- | Checks to see if a 'File' has a given URI scheme. hunk ./gio/System/GIO/File/File.chs 454 --- | Gets the URI scheme for a GFile. RFC 3986 decodes the scheme as: +-- | Gets the URI scheme for a 'File'. RFC 3986 decodes the scheme as: hunk ./gio/System/GIO/File/File.chs 465 --- | Opens a file for reading. The result is a GFileInputStream that can be used to read the contents of +-- | Opens a file for reading. The result is a 'FileInputStream' that can be used to read the contents of hunk ./gio/System/GIO/File/File.chs 469 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 472 --- If the file does not exist, the GIoErrorNotFound error will be returned. If the file is a --- directory, the GIoErrorIsDirectory error will be returned. Other errors are possible too, and +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. If the file is a +-- directory, the 'IoErrorIsDirectory' error will be returned. Other errors are possible too, and hunk ./gio/System/GIO/File/File.chs 476 -fileRead file (Just cancellable) = constructNewGObject mkFileInputStream $ - propagateGError $ {# call file_read #} (toFile file) cancellable -fileRead file Nothing = constructNewGObject mkFileInputStream $ - propagateGError $ {# call file_read #} (toFile file) (Cancellable nullForeignPtr) +fileRead file cancellable = + constructNewGObject mkFileInputStream $ + withGObject (toFile file) $ \cFile -> + maybeWith withGObject cancellable $ \cCancellable -> + propagateGError (g_file_read cFile cCancellable) [_$_] + where _ = {# call file_read #} hunk ./gio/System/GIO/File/File.chs 512 - propagateGError ({# call file_read_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileInputStream $ + propagateGError ({# call file_read_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 518 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 523 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 526 --- Some file systems don't allow all file names, and may return an GIoErrorInvalidFilename --- error. If the file is a directory the GIoErrorIsDirectory error will be returned. Other errors +-- Some file systems don't allow all file names, and may return an 'IoErrorInvalidFilename' +-- error. If the file is a directory the 'IoErrorIsDirectory' error will be returned. Other errors hunk ./gio/System/GIO/File/File.chs 535 + makeNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 538 - propagateGError (g_file_append_to cFile (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_append_to cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 543 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 548 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 551 --- If a file or directory with this name already exists the GIoErrorExists error will be +-- If a file or directory with this name already exists the 'IoErrorExists' error will be hunk ./gio/System/GIO/File/File.chs 553 --- GIoErrorInvalidFilename error, and if the name is to long GIoErrorFilenameTooLong will be +-- 'IoErrorInvalidFilename' error, and if the name is to long 'IoErrorFilenameTooLong' will be hunk ./gio/System/GIO/File/File.chs 561 + constructNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 564 - propagateGError (g_file_create cFile (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_create cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 574 --- By default files created are generally readable by everyone, but if you pass GFileCreatePrivate +-- By default files created are generally readable by everyone, but if you pass 'FileCreatePrivate' hunk ./gio/System/GIO/File/File.chs 579 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 583 --- file, and if they differ an GIoErrorWrongEtag error is returned. This generally means that the +-- file, and if they differ an 'IoErrorWrongEtag' error is returned. This generally means that the hunk ./gio/System/GIO/File/File.chs 585 --- 'fileOutputStreamGetEtag' after you've finished writing and closed the GFileOutputStream. +-- 'fileOutputStreamGetEtag' after you've finished writing and closed the 'FileOutputStream'. hunk ./gio/System/GIO/File/File.chs 589 --- overwriting it. If this fails a GIoErrorCantCreateBackup error will be returned. If you want to +-- overwriting it. If this fails a 'IoErrorCantCreateBackup' error will be returned. If you want to hunk ./gio/System/GIO/File/File.chs 592 --- If the file is a directory the GIoErrorIsDirectory error will be returned, and if the file is --- some other form of non-regular file then a GIoErrorNotRegularFile error will be returned. Some --- file systems don't allow all file names, and may return an GIoErrorInvalidFilename error, and if --- the name is to long GIoErrorFilenameTooLong will be returned. Other errors are possible too, +-- If the file is a directory the 'IoErrorIsDirectory' error will be returned, and if the file is +-- some other form of non-regular file then a 'IoErrorNotRegularFile' error will be returned. Some +-- file systems don't allow all file names, and may return an 'IoErrorInvalidFilename' error, and if +-- the name is to long 'IoErrorFilenameTooLong' will be returned. Other errors are possible too, hunk ./gio/System/GIO/File/File.chs 605 + makeNewGObject mkFileOutputStream $ hunk ./gio/System/GIO/File/File.chs 612 - (cFromFlags flags) cCancellable) >>= - takeGObject + ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 633 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 646 - propagateGError ({# call file_append_to_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_append_to_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 668 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 681 - propagateGError ({# call file_create_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_create_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 708 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 721 - propagateGError ({# call file_replace_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileOutputStream $ + propagateGError ({# call file_replace_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 724 --- | Gets the requested information about specified file. The result is a 'GFileInfo' object that contains +-- | Gets the requested information about specified file. The result is a 'FileInfo' object that contains hunk ./gio/System/GIO/File/File.chs 732 --- are available as defines, like 'GFileAttributeStandardName'. +-- are available as defines, like 'FileAttributeStandardName'. hunk ./gio/System/GIO/File/File.chs 735 --- from another thread. If the operation was cancelled, the error 'GIoErrorCancelled' will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 739 --- information about the symlink itself. However if you pass 'GFileQueryInfoNofollowSymlinks' in +-- information about the symlink itself. However if you pass 'FileQueryInfoNofollowSymlinks' in hunk ./gio/System/GIO/File/File.chs 743 --- If the file does not exist, the 'GIoErrorNotFound' error will be returned. Other errors are +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. Other errors are hunk ./gio/System/GIO/File/File.chs 752 + makeNewGObject mkFileInfo $ hunk ./gio/System/GIO/File/File.chs 756 - propagateGError (g_file_query_info cFile cAttributes (cFromFlags flags) cCancellable) >>= - takeGObject + propagateGError (g_file_query_info cFile cAttributes ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 759 --- | Asynchronously gets the requested information about specified file. The --- result is a 'GFileInfo' object that contains key-value attributes (such as --- type or size for the file). --- [_$_] --- For more details, see 'fileQueryInfo' which is the synchronous version of --- this call. --- [_$_] +-- | Asynchronously gets the requested information about specified file. The result is a 'FileInfo' object +-- that contains key-value attributes (such as type or size for the file). +-- [_$_] +-- For more details, see 'fileQueryInfo' which is the synchronous version of this call. +-- [_$_] hunk ./gio/System/GIO/File/File.chs 781 - (cFromFlags flags) + ((fromIntegral . fromFlags) flags) hunk ./gio/System/GIO/File/File.chs 794 - propagateGError ({#call file_query_info_finish #} (toFile file) asyncResult) >>= takeGObject + constructNewGObject mkFileInfo $ + propagateGError ({#call file_query_info_finish #} (toFile file) asyncResult) hunk ./gio/System/GIO/File/File.chs 809 --- 'fileCreate' which will either atomically create the file or fail with a GIoErrorExists error. +-- 'fileCreate' which will either atomically create the file or fail with a 'IoErrorExists' error. hunk ./gio/System/GIO/File/File.chs 818 - -> IO Bool + -> Bool hunk ./gio/System/GIO/File/File.chs 820 + unsafePerformIO $ hunk ./gio/System/GIO/File/File.chs 827 --- | Utility function to inspect the GFileType of a file. This is implemented using 'fileQueryInfo' +-- | Utility function to inspect the 'FileType' of a file. This is implemented using 'fileQueryInfo' hunk ./gio/System/GIO/File/File.chs 835 - -> IO FileType + -> FileType hunk ./gio/System/GIO/File/File.chs 837 - liftM (toEnum . fromIntegral) $ + (toEnum . fromIntegral) $ + unsafePerformIO $ [_$_] hunk ./gio/System/GIO/File/File.chs 841 - (g_file_query_file_type cFile (cFromFlags flags) cCancellable) + (g_file_query_file_type cFile ((fromIntegral . fromFlags) flags) cCancellable) hunk ./gio/System/GIO/File/File.chs 851 --- wildcard "*" means all attributes, and a wildcard like "fs:*" means all attributes in the fs +-- wildcard \"*\" means all attributes, and a wildcard like "fs:*" means all attributes in the fs hunk ./gio/System/GIO/File/File.chs 854 --- 'FILEAttributeFilesystemFree (Number Of Bytes Available)', and GFileAttributeFilesystemType +-- 'FILEAttributeFilesystemFree (Number Of Bytes Available)', and 'FileAttributeFilesystemType' hunk ./gio/System/GIO/File/File.chs 858 --- from another thread. If the operation was cancelled, the error GIoErrorCancelled will be +-- from another thread. If the operation was cancelled, the error 'IoErrorCancelled' will be hunk ./gio/System/GIO/File/File.chs 861 --- If the file does not exist, the GIoErrorNotFound error will be returned. Other errors are +-- If the file does not exist, the 'IoErrorNotFound' error will be returned. Other errors are hunk ./gio/System/GIO/File/File.chs 869 + makeNewGObject mkFileInfo $ hunk ./gio/System/GIO/File/File.chs 873 - propagateGError (g_file_query_filesystem_info cFile cAttributes cCancellable) >>= - takeGObject + propagateGError (g_file_query_filesystem_info cFile cAttributes cCancellable) hunk ./gio/System/GIO/File/File.chs 877 --- on. The result is a GFi... [truncated message content] |