gi-gtksource-3.0.22: GtkSource bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.GtkSource.Objects.File

Description

No description available in the introspection data.

Synopsis

Exported types

newtype File Source #

Memory-managed wrapper type.

Constructors

File (ManagedPtr File) 

Instances

Instances details
Eq File Source # 
Instance details

Defined in GI.GtkSource.Objects.File

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

IsGValue File Source #

Convert File to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.GtkSource.Objects.File

GObject File Source # 
Instance details

Defined in GI.GtkSource.Objects.File

Methods

gobjectType :: IO GType #

HasParentTypes File Source # 
Instance details

Defined in GI.GtkSource.Objects.File

type ParentTypes File Source # 
Instance details

Defined in GI.GtkSource.Objects.File

class (GObject o, IsDescendantOf File o) => IsFile o Source #

Type class for types which can be safely cast to File, for instance with toFile.

Instances

Instances details
(GObject o, IsDescendantOf File o) => IsFile o Source # 
Instance details

Defined in GI.GtkSource.Objects.File

toFile :: (MonadIO m, IsFile o) => o -> m File Source #

Cast to File, for types for which this is known to be safe. For general casts, use castTo.

noFile :: Maybe File Source #

A convenience alias for Nothing :: Maybe File.

Methods

Overloaded methods

checkFileOnDisk

fileCheckFileOnDisk Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m () 

Checks synchronously the file on disk, to know whether the file is externally modified, or has been deleted, and whether the file is read-only.

File doesn't create a FileMonitor to track those properties, so this function needs to be called instead. Creating lots of FileMonitor's would take lots of resources.

Since this function is synchronous, it is advised to call it only on local files. See fileIsLocal.

Since: 3.18

getCompressionType

fileGetCompressionType Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m CompressionType

Returns: the compression type.

No description available in the introspection data.

Since: 3.14

getEncoding

fileGetEncoding Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m Encoding

Returns: the character encoding.

The encoding is initially Nothing. After a successful file loading or saving operation, the encoding is non-Nothing.

Since: 3.14

getLocation

fileGetLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m File

Returns: the File.

No description available in the introspection data.

Since: 3.14

getNewlineType

fileGetNewlineType Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m NewlineType

Returns: the newline type.

No description available in the introspection data.

Since: 3.14

isDeleted

fileIsDeleted Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m Bool

Returns: whether the file has been deleted.

Returns whether the file has been deleted. If the File:location is Nothing, returns False.

To have an up-to-date value, you must first call fileCheckFileOnDisk.

Since: 3.18

isExternallyModified

fileIsExternallyModified Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m Bool

Returns: whether the file is externally modified.

Returns whether the file is externally modified. If the File:location is Nothing, returns False.

To have an up-to-date value, you must first call fileCheckFileOnDisk.

Since: 3.18

isLocal

fileIsLocal Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m Bool

Returns: whether the file is local.

Returns whether the file is local. If the File:location is Nothing, returns False.

Since: 3.18

isReadonly

fileIsReadonly Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a) 
=> a

file: a File.

-> m Bool

Returns: whether the file is read-only.

Returns whether the file is read-only. If the File:location is Nothing, returns False.

To have an up-to-date value, you must first call fileCheckFileOnDisk.

Since: 3.18

new

fileNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m File

Returns: a new File object.

No description available in the introspection data.

Since: 3.14

setLocation

fileSetLocation Source #

Arguments

:: (HasCallStack, MonadIO m, IsFile a, IsFile b) 
=> a

file: a File.

-> Maybe b

location: the new File, or Nothing.

-> m () 

Sets the location.

Since: 3.14

Properties

compressionType

The compression type.

Since: 3.14

getFileCompressionType :: (MonadIO m, IsFile o) => o -> m CompressionType Source #

Get the value of the “compression-type” property. When overloading is enabled, this is equivalent to

get file #compressionType

encoding

The character encoding, initially Nothing. After a successful file loading or saving operation, the encoding is non-Nothing.

Since: 3.14

getFileEncoding :: (MonadIO m, IsFile o) => o -> m Encoding Source #

Get the value of the “encoding” property. When overloading is enabled, this is equivalent to

get file #encoding

location

The location.

Since: 3.14

clearFileLocation :: (MonadIO m, IsFile o) => o -> m () Source #

Set the value of the “location” property to Nothing. When overloading is enabled, this is equivalent to

clear #location

constructFileLocation :: (IsFile o, IsFile a) => a -> IO (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “location” property. This is rarely needed directly, but it is used by new.

getFileLocation :: (MonadIO m, IsFile o) => o -> m File Source #

Get the value of the “location” property. When overloading is enabled, this is equivalent to

get file #location

setFileLocation :: (MonadIO m, IsFile o, IsFile a) => o -> a -> m () Source #

Set the value of the “location” property. When overloading is enabled, this is equivalent to

set file [ #location := value ]

newlineType

The line ending type.

Since: 3.14

getFileNewlineType :: (MonadIO m, IsFile o) => o -> m NewlineType Source #

Get the value of the “newline-type” property. When overloading is enabled, this is equivalent to

get file #newlineType

readOnly

Whether the file is read-only or not. The value of this property is not updated automatically (there is no file monitors).

Since: 3.18

getFileReadOnly :: (MonadIO m, IsFile o) => o -> m Bool Source #

Get the value of the “read-only” property. When overloading is enabled, this is equivalent to

get file #readOnly