{-# LINE 2 "./System/GIO/File/FileInfo.chs" #-}-- GIMP Toolkit (GTK) Binding for Haskell: binding to gio -*-haskell-*----- Author : Andy Stewart-- Created: 30-Apirl-2010---- Copyright (c) 2010 Andy Stewart---- This library is free software: you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public License-- as published by the Free Software Foundation, either version 3 of-- the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- You should have received a copy of the GNU Lesser General Public-- License along with this program. If not, see-- <http:---- GIO, the C library which this Haskell library depends on, is-- available under LGPL Version 2. The documentation included with-- this library is based on the original GIO documentation.---- | Maintainer : gtk2hs-devel@lists.sourceforge.net-- Stability : alpha-- Portability : portable (depends on GHC)moduleSystem.GIO.File.FileInfo(-- * Details---- | Functionality for manipulating basic metadata for files. 'FileInfo' implements methods for getting-- information that all files should contain, and allows for manipulation of extended attributes.---- See 'FileAttribute' for more information on how GIO handles file attributes.---- To obtain a 'FileInfo' for a 'File', use 'fileQueryInfo'. To obtain a-- 'FileInfo' for a file input or output stream, use 'fileInputStreamQueryInfo' or-- 'fileOutputStreamQueryInfo'.---- To change the actual attributes of a file, you should then set the attribute in the 'FileInfo' and-- call 'fileSetAttributesFromInfo' on a 'File'.---- However, not all attributes can be changed in the file. For instance, the actual size of a file-- cannot be changed via 'fileInfoSetSize' and-- 'fileQueryWritableNamespaces' to discover the settable attributes of a particular file at-- runtime.---- 'FileAttributeMatcher' allows for searching through a 'FileInfo' for attributes.-- * TypesFileInfo(..),FileInfoClass,-- * Enums,FileAttributeStatus(..),-- * MethodsfileInfoNew,fileInfoDup,fileInfoCopyInto,fileInfoHasAttribute,fileInfoHasNamespace,fileInfoListAttributes,fileInfoGetAttributeType,fileInfoRemoveAttribute,fileInfoGetAttributeAsString,fileInfoGetAttributeStatus,fileInfoGetAttributeString,fileInfoGetAttributeStringList,fileInfoGetAttributeByteString,fileInfoGetAttributeBool,fileInfoGetAttributeWord32,fileInfoGetAttributeInt32,fileInfoGetAttributeWord64,fileInfoGetAttributeInt64,fileInfoGetAttributeObject,fileInfoSetAttributeStatus,fileInfoSetAttributeString,fileInfoSetAttributeStringList,fileInfoSetAttributeByteString,fileInfoSetAttributeBool,fileInfoSetAttributeWord32,fileInfoSetAttributeInt32,fileInfoSetAttributeWord64,fileInfoSetAttributeInt64,fileInfoSetAttributeObject,fileInfoClearStatus,fileInfoGetFileType,fileInfoGetIsHidden,fileInfoGetIsBackup,fileInfoGetIsSymlink,fileInfoGetName,fileInfoGetDisplayName,fileInfoGetEditName,fileInfoGetIcon,fileInfoGetContentType,fileInfoGetModificationTime,fileInfoGetSize,fileInfoGetSymlinkTarget,fileInfoGetEtag,fileInfoGetSortOrder,fileInfoUnsetAttributeMask,fileInfoSetFileType,fileInfoSetIsHidden,fileInfoSetIsSymlink,fileInfoSetName,fileInfoSetDisplayName,fileInfoSetEditName,fileInfoSetIcon,fileInfoSetContentType,fileInfoSetModificationTime,fileInfoSetSize,-- 'fileInfoSetSymlinkTarget' use *static string* that we don't understand the purpose of this function.-- If someone know how to use it, uncomment it and fix documentation.-- fileInfoSetSymlinkTarget,fileInfoSetSortOrder,)whereimportControl.MonadimportData.ByteString(ByteString)importData.ByteString(useAsCString)importData.ByteString.Unsafe(unsafePackCStringFinalizer)importSystem.Glib.FFIimportSystem.Glib.FlagsimportSystem.Glib.GErrorimportSystem.Glib.UTFStringimportSystem.Glib.GObjectimportSystem.Glib.GDateTimeimportSystem.GIO.EnumsimportSystem.GIO.File.FileAttributeimportSystem.GIO.Types{-# LINE 147 "./System/GIO/File/FileInfo.chs" #-}{-# LINE 149 "./System/GIO/File/FileInfo.chs" #-}-- | Creates a new file info structure.fileInfoNew::IOFileInfofileInfoNew=wrapNewGObjectmkFileInfo$g_file_info_new{-# LINE 155 "./System/GIO/File/FileInfo.chs" #-}-- | Duplicates a file info structure.fileInfoDup::FileInfoClassinfo=>info->IOFileInfofileInfoDupinfo=wrapNewGObjectmkFileInfo$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_dupargPtr1)(toFileInfoinfo)-- | Copies all of the 'FileAttributes' from @srcInfo@ to @destInfo@.fileInfoCopyInto::(FileInfoClasssrcInfo,FileInfoClassdestInfo)=>srcInfo-- ^ @srcInfo@ source to copy attributes from.->destInfo-- ^ @destInfo@ destination to copy attributes to.->IO()fileInfoCopyIntosrcInfodestInfo=(\(FileInfoarg1)(FileInfoarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->g_file_info_copy_intoargPtr1argPtr2)(toFileInfosrcInfo)(toFileInfodestInfo)-- | Checks if a file info structure has an attribute named attribute.fileInfoHasAttribute::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Bool-- ^ returns 'True' if Ginfo has an attribute named attribute, 'False' otherwise.fileInfoHasAttributeinfoattribute=toBool$unsafePerformIO$withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_has_attributeargPtr1arg2)(toFileInfoinfo)attributePtr-- | Checks if a file info structure has an attribute in the specified @nameSpace@.fileInfoHasNamespace::FileInfoClassinfo=>info->String-- ^ @namespace@ a file namespace key.->Bool-- ^ returns 'True' if Ginfo has an namespace named namespace, 'False' otherwise.fileInfoHasNamespaceinfonamespace=toBool$unsafePerformIO$withUTFStringnamespace$\namespacePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_has_namespaceargPtr1arg2)(toFileInfoinfo)namespacePtr-- | Lists the file info structure's attributes.fileInfoListAttributes::FileInfoClassinfo=>info->String-- ^ @nameSpace@ a file attribute key's namespace.->IO[String]-- ^ returns a array of strings of all of the possible attribute types for the given @nameSpace@fileInfoListAttributesinfonameSpace=withUTFStringnameSpace$\nameSpacePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_list_attributesargPtr1arg2)(toFileInfoinfo)nameSpacePtr>>=readUTFStringArray0-- | Gets the attribute type for an attribute key.fileInfoGetAttributeType::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOFileAttributeType-- ^ returns a 'FileAttributeType' for the given attribute, or 'FileAttributeTypeInvalid' if the key is not set.fileInfoGetAttributeTypeinfoattribute=liftM(toEnum.fromIntegral)$withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_typeargPtr1arg2)(toFileInfoinfo)attributePtr-- | Removes all cases of attribute from info if it exists.fileInfoRemoveAttribute::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IO()fileInfoRemoveAttributeinfoattribute=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_remove_attributeargPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets the value of a attribute, formated as a string. This escapes things as needed to make the-- string valid utf8.fileInfoGetAttributeAsString::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOString-- ^ returns a UTF-8 string associated with the given attribute.fileInfoGetAttributeAsStringinfoattribute=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_as_stringargPtr1arg2)(toFileInfoinfo)attributePtr>>=readUTFString-- | Gets the attribute status for an attribute key.fileInfoGetAttributeStatus::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOFileAttributeStatus-- ^ returns a 'FileAttributeStatus' for the given attribute, or 'FileAttributeStatusUnset' if the key is invalid.fileInfoGetAttributeStatusinfoattribute=liftM(toEnum.fromIntegral)$withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_statusargPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets the value of a string attribute.fileInfoGetAttributeString::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOString-- ^ returns the contents of the attribute value as a stringfileInfoGetAttributeStringinfoattribute=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_stringargPtr1arg2)(toFileInfoinfo)attributePtr>>=readUTFString-- | Gets the value of a stringv attribute. If the attribute does not contain a stringvfileInfoGetAttributeStringList::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IO[String]-- ^ returns the contents of the attribute value as a string listfileInfoGetAttributeStringListinfoattribute=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_stringvargPtr1arg2)(toFileInfoinfo)attributePtr>>=readUTFStringArray0-- | Gets the value of a byte string attribute.fileInfoGetAttributeByteString::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOByteString-- ^ returns the contents of the attribute value as a ByteStringfileInfoGetAttributeByteStringinfoattribute=withUTFStringattribute$\attributePtr->dosPtr<-(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_byte_stringargPtr1arg2)(toFileInfoinfo)attributePtrsLen<-lengthArray00sPtrunsafePackCStringFinalizer(castPtrsPtr)(fromIntegralsLen)(g_free(castPtrsPtr))-- | Gets the value of a boolean attribute.fileInfoGetAttributeBool::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOBool-- ^ returns the contents of the attribute value as a boolfileInfoGetAttributeBoolinfoattribute=liftMtoBool$withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_booleanargPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets an Word32 contained within the attribute.fileInfoGetAttributeWord32::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOWord32-- ^ returns the contents of the attribute value as a boolfileInfoGetAttributeWord32infoattribute=liftMfromIntegral$withUTFStringattribute$\attributePtr->do(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_uint32argPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets an Int32 contained within the attribute.fileInfoGetAttributeInt32::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOInt32-- ^ returns the contents of the attribute value as a boolfileInfoGetAttributeInt32infoattribute=liftMfromIntegral$withUTFStringattribute$\attributePtr->do(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_int32argPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets an Word64 contained within the attribute.fileInfoGetAttributeWord64::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOWord64-- ^ returns the contents of the attribute value as a boolfileInfoGetAttributeWord64infoattribute=liftMfromIntegral$withUTFStringattribute$\attributePtr->do(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_uint64argPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets an Int64 contained within the attribute.fileInfoGetAttributeInt64::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IOInt64-- ^ returns the contents of the attribute value as a boolfileInfoGetAttributeInt64infoattribute=liftMfromIntegral$withUTFStringattribute$\attributePtr->do(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_int64argPtr1arg2)(toFileInfoinfo)attributePtr-- | Gets the value of a GObject attribute.fileInfoGetAttributeObject::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->IO(MaybeGObject)-- ^ returns the contents of the attribute value as a objectfileInfoGetAttributeObjectinfoattribute=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_attribute_objectargPtr1arg2)(toFileInfoinfo)attributePtr>>=\x->maybeNull(makeNewGObjectmkGObject)(return$castPtrx)-- | Sets the attribute status for an attribute key. This is only needed by external code that implement-- 'fileSetAttributesFromInfo' or similar functions.---- The attribute must exist in info for this to work. Otherwise 'False' is returned and info is-- unchanged.fileInfoSetAttributeStatus::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key->FileAttributeStatus-- ^ @status@ a 'FileAttributeStatus'->IOBool-- ^ returns 'True' if the status was changed, 'False' if the key was not set.fileInfoSetAttributeStatusinfoattributestatus=liftMtoBool$withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_statusargPtr1arg2arg3){-# LINE 334 "./System/GIO/File/FileInfo.chs" #-}(toFileInfoinfo)attributePtr((fromIntegral.fromEnum)status)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeString::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->String-- ^ @attrValue@ a string.->IO()fileInfoSetAttributeStringinfoattributeattrValue=withUTFStringattribute$\attributePtr->withUTFStringattrValue$\attrValuePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_stringargPtr1arg2arg3)(toFileInfoinfo)attributePtrattrValuePtr-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeStringList::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->[String]-- ^ @attrValue@ a string.->IO()fileInfoSetAttributeStringListinfoattributeattrValue=withUTFStringattribute$\attributePtr->withUTFStringArray0attrValue$\attrValuePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_stringvargPtr1arg2arg3)(toFileInfoinfo)attributePtrattrValuePtr-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeByteString::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->ByteString-- ^ @attrValue@ a string.->IO()fileInfoSetAttributeByteStringinfoattributeattrValue=withUTFStringattribute$\attributePtr->useAsCStringattrValue$\attrValuePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_byte_stringargPtr1arg2arg3)(toFileInfoinfo)attributePtrattrValuePtr-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeBool::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Bool-- ^ @attrValue@ a string.->IO()fileInfoSetAttributeBoolinfoattributeattrValue=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_booleanargPtr1arg2arg3)(toFileInfoinfo)attributePtr(fromBoolattrValue)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeWord32::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Word32-- ^ @attrValue@ an Word32->IO()fileInfoSetAttributeWord32infoattributeattrValue=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_uint32argPtr1arg2arg3)(toFileInfoinfo)attributePtr(fromIntegralattrValue)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeInt32::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Int32-- ^ @attrValue@ an Int32->IO()fileInfoSetAttributeInt32infoattributeattrValue=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_int32argPtr1arg2arg3)(toFileInfoinfo)attributePtr(fromIntegralattrValue)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeWord64::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Word64-- ^ @attrValue@ an Word64->IO()fileInfoSetAttributeWord64infoattributeattrValue=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_uint64argPtr1arg2arg3)(toFileInfoinfo)attributePtr(fromIntegralattrValue)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeInt64::FileInfoClassinfo=>info->String-- ^ @attribute@ a file attribute key.->Int64-- ^ @attrValue@ an Int64->IO()fileInfoSetAttributeInt64infoattributeattrValue=withUTFStringattribute$\attributePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_int64argPtr1arg2arg3)(toFileInfoinfo)attributePtr(fromIntegralattrValue)-- | Sets the attribute to contain the given @attrValue@, if possible.fileInfoSetAttributeObject::FileInfoClassinfo=>info->String->GObject->IO()fileInfoSetAttributeObjectinfoattribute(GObjectattrValue)=withUTFStringattribute$\attributePtr->withForeignPtrattrValue$\attrValuePtr->(\(FileInfoarg1)arg2arg3->withForeignPtrarg1$\argPtr1->g_file_info_set_attribute_objectargPtr1arg2arg3)(toFileInfoinfo)attributePtr(castPtrattrValuePtr)-- | Clears the status information from info.--fileInfoClearStatus::FileInfoClassinfo=>info->IO()fileInfoClearStatusinfo=(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_clear_statusargPtr1)(toFileInfoinfo)-- | Gets a file's type (whether it is a regular file, symlink, etc). This is different from the file's-- content type, see 'fileInfoGetContentType'.--fileInfoGetFileType::FileInfoClassinfo=>info->FileType-- ^ returns a 'FileType' for the given file.fileInfoGetFileTypeinfo=(toEnum.fromIntegral)$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_file_typeargPtr1)(toFileInfoinfo)-- | Checks if a file is hidden.fileInfoGetIsHidden::FileInfoClassinfo=>info->Bool-- ^ returns 'True' if the file is a hidden file, 'False' otherwise.fileInfoGetIsHiddeninfo=toBool$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_is_hiddenargPtr1)(toFileInfoinfo)-- | Checks if a file is a backup file.fileInfoGetIsBackup::FileInfoClassinfo=>info->Bool-- ^ returns 'True' if the file is a backup file, 'False' otherwise.fileInfoGetIsBackupinfo=toBool$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_is_backupargPtr1)(toFileInfoinfo)-- | Checks if a file is a symlink file.fileInfoGetIsSymlink::FileInfoClassinfo=>info->Bool-- ^ returns 'True' if the file is a symlink file, 'False' otherwise.fileInfoGetIsSymlinkinfo=toBool$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_is_symlinkargPtr1)(toFileInfoinfo)-- | Gets the name for a file.fileInfoGetName::FileInfoClassinfo=>info->MaybeByteString-- ^ returns a string containing the file name.fileInfoGetNameinfo=unsafePerformIO$dosPtr<-(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_nameargPtr1)(toFileInfoinfo)ifsPtr==nullPtrthenreturnNothingelsedosLen<-lengthArray00sPtrliftMJust$unsafePackCStringFinalizer(castPtrsPtr)(fromIntegralsLen)(g_free(castPtrsPtr))-- | Gets the display name for a file.fileInfoGetDisplayName::FileInfoClassinfo=>info->MaybeString-- ^ returns a string containing the display name.fileInfoGetDisplayNameinfo=unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_display_nameargPtr1)(toFileInfoinfo)>>=maybePeekreadUTFString-- | Gets the edit name for a file.fileInfoGetEditName::FileInfoClassinfo=>info->MaybeString-- ^ returns a string containing the edit name.fileInfoGetEditNameinfo=unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_edit_nameargPtr1)(toFileInfoinfo)>>=maybePeekreadUTFString-- | Gets the icon for a file.fileInfoGetIcon::FileInfoClassinfo=>info->IOIcon-- ^ returns 'Icon' for the given info.fileInfoGetIconinfo=makeNewGObjectmkIcon$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_iconargPtr1)(toFileInfoinfo)-- | Gets the file's content type.fileInfoGetContentType::FileInfoClassinfo=>info->MaybeString-- ^ returns a string containing the file's content type. fileInfoGetContentTypeinfo=unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_content_typeargPtr1)(toFileInfoinfo)>>=maybePeekpeekUTFString-- | Gets the modification time of the current info and sets it in result.fileInfoGetModificationTime::FileInfoClassinfo=>info->GTimeValfileInfoGetModificationTimeinfo=unsafePerformIO$alloca$\timeValPtr->do(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_get_modification_timeargPtr1arg2)(toFileInfoinfo)(castPtrtimeValPtr)peektimeValPtr-- | Gets the file's size.fileInfoGetSize::FileInfoClassinfo=>info->Int64-- ^ returns a 'Offset' containing the file's size. fileInfoGetSizeinfo=fromIntegral$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_sizeargPtr1)(toFileInfoinfo)-- | Gets the symlink target for a given 'FileInfo'.fileInfoGetSymlinkTarget::FileInfoClassinfo=>info->MaybeString-- ^ returns a string containing the symlink target.fileInfoGetSymlinkTargetinfo=unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_symlink_targetargPtr1)(toFileInfoinfo)>>=maybePeekreadUTFString-- | Gets the entity tag for a given 'FileInfo'. See 'FileAttributeEtagValue'.fileInfoGetEtag::FileInfoClassinfo=>info->MaybeString-- ^ returns a string containing the value of the "etag:value" attribute.fileInfoGetEtaginfo=unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_etagargPtr1)(toFileInfoinfo)>>=maybePeekreadUTFString-- | Gets the value of the @sortOrder@ attribute from the 'FileInfo'. See-- 'FileAttributeStandardSortOrder'.fileInfoGetSortOrder::FileInfoClassinfo=>info->Int-- ^ returns the value of the \"standard::sort_order\" attribute.fileInfoGetSortOrderinfo=fromIntegral$unsafePerformIO$(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_get_sort_orderargPtr1)(toFileInfoinfo)-- | Unsets a mask set by 'fileInfoSetAttributeMask', if one is set.fileInfoUnsetAttributeMask::FileInfoClassinfo=>info->IO()fileInfoUnsetAttributeMaskinfo=(\(FileInfoarg1)->withForeignPtrarg1$\argPtr1->g_file_info_unset_attribute_maskargPtr1)(toFileInfoinfo)-- | Sets the file type in a 'FileInfo' to type. See 'FileAttributeStandardType'.fileInfoSetFileType::FileInfoClassinfo=>info->FileType->IO()fileInfoSetFileTypeinfofType=(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_file_typeargPtr1arg2){-# LINE 555 "./System/GIO/File/FileInfo.chs" #-}(toFileInfoinfo)((fromIntegral.fromEnum)fType)-- | Sets the @isHidden@ attribute in a 'FileInfo' according to @isSymlink@. See-- 'FileAttributeStandardIsHidden'.fileInfoSetIsHidden::FileInfoClassinfo=>info->Bool->IO()fileInfoSetIsHiddeninfoisHidden=(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_is_hiddenargPtr1arg2)(toFileInfoinfo)(fromBoolisHidden)-- | Sets the @isSymlink@ attribute in a 'FileInfo' according to @isSymlink@. See-- 'FileAttributeStandardIsSymlink'.fileInfoSetIsSymlink::FileInfoClassinfo=>info->Bool->IO()fileInfoSetIsSymlinkinfoisSymlink=(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_is_symlinkargPtr1arg2)(toFileInfoinfo)(fromBoolisSymlink)-- | Sets the name attribute for the current 'FileInfo'. See 'FileAttributeStandardName'.fileInfoSetName::FileInfoClassinfo=>info->ByteString->IO()fileInfoSetNameinfoname=useAsCStringname$\namePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_nameargPtr1arg2)(toFileInfoinfo)namePtr-- | Sets the display name for the current 'FileInfo'. See 'FileAttributeStandardDisplayName'.fileInfoSetDisplayName::FileInfoClassinfo=>info->String->IO()fileInfoSetDisplayNameinfodisplayName=withUTFStringdisplayName$\displayNamePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_display_nameargPtr1arg2)(toFileInfoinfo)displayNamePtr-- | Sets the edit name for the current 'FileInfo'. See 'FileAttributeStandardEditName'.fileInfoSetEditName::FileInfoClassinfo=>info->String->IO()fileInfoSetEditNameinfoeditName=withUTFStringeditName$\editNamePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_edit_nameargPtr1arg2)(toFileInfoinfo)editNamePtr-- | Sets the icon for a given 'FileInfo'. See 'FileAttributeStandardIcon'.fileInfoSetIcon::FileInfoClassinfo=>info->Icon->IO()fileInfoSetIconinfoicon=(\(FileInfoarg1)(Iconarg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->g_file_info_set_iconargPtr1argPtr2)(toFileInfoinfo)(toIconicon)-- | Sets the content type attribute for a given 'FileInfo'. See 'FileAttributeStandardContentType'.fileInfoSetContentType::FileInfoClassinfo=>info->String-- ^ @contentType@ a content type. See GContentType.->IO()fileInfoSetContentTypeinfocontentType=withUTFStringcontentType$\contentTypePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_content_typeargPtr1arg2)(toFileInfoinfo)contentTypePtr-- | Sets the 'FileAttributeTimeModified' attribute in the file info to the given time value.fileInfoSetModificationTime::FileInfoClassinfo=>info->GTimeVal->IO()fileInfoSetModificationTimeinfomtime=withmtime$\mtimePtr->(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_modification_timeargPtr1arg2)(toFileInfoinfo)(castPtrmtimePtr)-- | Sets the 'FileAttributeStandardSize' attribute in the file info to the given size.fileInfoSetSize::FileInfoClassinfo=>info->Int64-- ^ @size@ a goffset containing the file's size. ->IO()fileInfoSetSizeinfosize=(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_sizeargPtr1arg2)(toFileInfoinfo)(fromIntegralsize)-- | Sets the 'FileAttributeStandardSymlinkTarget' attribute in the file info to the given symlink-- target.-- fileInfoSetSymlinkTarget :: FileInfoClass info => info-- -> String -- ^ @symlinkTarget@ a static string containing a path to a symlink target.-- -> IO ()-- fileInfoSetSymlinkTarget info symlinkTarget =-- withUTFString symlinkTarget $ \ symlinkTargetPtr ->-- {#call g_file_info_set_symlink_target#} (toFileInfo info) symlinkTargetPtr-- | Sets the sort order attribute in the file info structure. See 'FileAttributeStandardSortOrder'.fileInfoSetSortOrder::FileInfoClassinfo=>info->Int-- ^ @sortOrder@ a sort order integer.->IO()fileInfoSetSortOrderinfosortOrder=(\(FileInfoarg1)arg2->withForeignPtrarg1$\argPtr1->g_file_info_set_sort_orderargPtr1arg2)(toFileInfoinfo)(fromIntegralsortOrder)foreignimportccallsafe"g_file_info_new"g_file_info_new::(IO(PtrFileInfo))foreignimportccallsafe"g_file_info_dup"g_file_info_dup::((PtrFileInfo)->(IO(PtrFileInfo)))foreignimportccallsafe"g_file_info_copy_into"g_file_info_copy_into::((PtrFileInfo)->((PtrFileInfo)->(IO())))foreignimportccallsafe"g_file_info_has_attribute"g_file_info_has_attribute::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_has_namespace"g_file_info_has_namespace::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_list_attributes"g_file_info_list_attributes::((PtrFileInfo)->((PtrCChar)->(IO(Ptr(PtrCChar)))))foreignimportccallsafe"g_file_info_get_attribute_type"g_file_info_get_attribute_type::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_remove_attribute"g_file_info_remove_attribute::((PtrFileInfo)->((PtrCChar)->(IO())))foreignimportccallsafe"g_file_info_get_attribute_as_string"g_file_info_get_attribute_as_string::((PtrFileInfo)->((PtrCChar)->(IO(PtrCChar))))foreignimportccallsafe"g_file_info_get_attribute_status"g_file_info_get_attribute_status::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_get_attribute_string"g_file_info_get_attribute_string::((PtrFileInfo)->((PtrCChar)->(IO(PtrCChar))))foreignimportccallsafe"g_file_info_get_attribute_stringv"g_file_info_get_attribute_stringv::((PtrFileInfo)->((PtrCChar)->(IO(Ptr(PtrCChar)))))foreignimportccallsafe"g_file_info_get_attribute_byte_string"g_file_info_get_attribute_byte_string::((PtrFileInfo)->((PtrCChar)->(IO(PtrCChar))))foreignimportccallunsafe"g_free"g_free::((Ptr())->(IO()))foreignimportccallsafe"g_file_info_get_attribute_boolean"g_file_info_get_attribute_boolean::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_get_attribute_uint32"g_file_info_get_attribute_uint32::((PtrFileInfo)->((PtrCChar)->(IOCUInt)))foreignimportccallsafe"g_file_info_get_attribute_int32"g_file_info_get_attribute_int32::((PtrFileInfo)->((PtrCChar)->(IOCInt)))foreignimportccallsafe"g_file_info_get_attribute_uint64"g_file_info_get_attribute_uint64::((PtrFileInfo)->((PtrCChar)->(IOCULLong)))foreignimportccallsafe"g_file_info_get_attribute_int64"g_file_info_get_attribute_int64::((PtrFileInfo)->((PtrCChar)->(IOCLLong)))foreignimportccallsafe"g_file_info_get_attribute_object"g_file_info_get_attribute_object::((PtrFileInfo)->((PtrCChar)->(IO(Ptr()))))foreignimportccallsafe"g_file_info_set_attribute_status"g_file_info_set_attribute_status::((PtrFileInfo)->((PtrCChar)->(CInt->(IOCInt))))foreignimportccallsafe"g_file_info_set_attribute_string"g_file_info_set_attribute_string::((PtrFileInfo)->((PtrCChar)->((PtrCChar)->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_stringv"g_file_info_set_attribute_stringv::((PtrFileInfo)->((PtrCChar)->((Ptr(PtrCChar))->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_byte_string"g_file_info_set_attribute_byte_string::((PtrFileInfo)->((PtrCChar)->((PtrCChar)->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_boolean"g_file_info_set_attribute_boolean::((PtrFileInfo)->((PtrCChar)->(CInt->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_uint32"g_file_info_set_attribute_uint32::((PtrFileInfo)->((PtrCChar)->(CUInt->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_int32"g_file_info_set_attribute_int32::((PtrFileInfo)->((PtrCChar)->(CInt->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_uint64"g_file_info_set_attribute_uint64::((PtrFileInfo)->((PtrCChar)->(CULLong->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_int64"g_file_info_set_attribute_int64::((PtrFileInfo)->((PtrCChar)->(CLLong->(IO()))))foreignimportccallsafe"g_file_info_set_attribute_object"g_file_info_set_attribute_object::((PtrFileInfo)->((PtrCChar)->((Ptr())->(IO()))))foreignimportccallsafe"g_file_info_clear_status"g_file_info_clear_status::((PtrFileInfo)->(IO()))foreignimportccallsafe"g_file_info_get_file_type"g_file_info_get_file_type::((PtrFileInfo)->(IOCInt))foreignimportccallsafe"g_file_info_get_is_hidden"g_file_info_get_is_hidden::((PtrFileInfo)->(IOCInt))foreignimportccallsafe"g_file_info_get_is_backup"g_file_info_get_is_backup::((PtrFileInfo)->(IOCInt))foreignimportccallsafe"g_file_info_get_is_symlink"g_file_info_get_is_symlink::((PtrFileInfo)->(IOCInt))foreignimportccallsafe"g_file_info_get_name"g_file_info_get_name::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_display_name"g_file_info_get_display_name::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_edit_name"g_file_info_get_edit_name::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_icon"g_file_info_get_icon::((PtrFileInfo)->(IO(PtrIcon)))foreignimportccallsafe"g_file_info_get_content_type"g_file_info_get_content_type::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_modification_time"g_file_info_get_modification_time::((PtrFileInfo)->((Ptr())->(IO())))foreignimportccallsafe"g_file_info_get_size"g_file_info_get_size::((PtrFileInfo)->(IOCLLong))foreignimportccallsafe"g_file_info_get_symlink_target"g_file_info_get_symlink_target::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_etag"g_file_info_get_etag::((PtrFileInfo)->(IO(PtrCChar)))foreignimportccallsafe"g_file_info_get_sort_order"g_file_info_get_sort_order::((PtrFileInfo)->(IOCInt))foreignimportccallsafe"g_file_info_unset_attribute_mask"g_file_info_unset_attribute_mask::((PtrFileInfo)->(IO()))foreignimportccallsafe"g_file_info_set_file_type"g_file_info_set_file_type::((PtrFileInfo)->(CInt->(IO())))foreignimportccallsafe"g_file_info_set_is_hidden"g_file_info_set_is_hidden::((PtrFileInfo)->(CInt->(IO())))foreignimportccallsafe"g_file_info_set_is_symlink"g_file_info_set_is_symlink::((PtrFileInfo)->(CInt->(IO())))foreignimportccallsafe"g_file_info_set_name"g_file_info_set_name::((PtrFileInfo)->((PtrCChar)->(IO())))foreignimportccallsafe"g_file_info_set_display_name"g_file_info_set_display_name::((PtrFileInfo)->((PtrCChar)->(IO())))foreignimportccallsafe"g_file_info_set_edit_name"g_file_info_set_edit_name::((PtrFileInfo)->((PtrCChar)->(IO())))foreignimportccallsafe"g_file_info_set_icon"g_file_info_set_icon::((PtrFileInfo)->((PtrIcon)->(IO())))foreignimportccallsafe"g_file_info_set_content_type"g_file_info_set_content_type::((PtrFileInfo)->((PtrCChar)->(IO())))foreignimportccallsafe"g_file_info_set_modification_time"g_file_info_set_modification_time::((PtrFileInfo)->((Ptr())->(IO())))foreignimportccallsafe"g_file_info_set_size"g_file_info_set_size::((PtrFileInfo)->(CLLong->(IO())))foreignimportccallsafe"g_file_info_set_sort_order"g_file_info_set_sort_order::((PtrFileInfo)->(CInt->(IO())))