| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GtkSource.Objects.File
Contents
Description
- newtype File = File (ManagedPtr File)
- class GObject o => IsFile o
- toFile :: (MonadIO m, IsFile o) => o -> m File
- noFile :: Maybe File
- fileCheckFileOnDisk :: (HasCallStack, MonadIO m, IsFile a) => a -> m ()
- fileGetCompressionType :: (HasCallStack, MonadIO m, IsFile a) => a -> m CompressionType
- fileGetEncoding :: (HasCallStack, MonadIO m, IsFile a) => a -> m Encoding
- fileGetLocation :: (HasCallStack, MonadIO m, IsFile a) => a -> m File
- fileGetNewlineType :: (HasCallStack, MonadIO m, IsFile a) => a -> m NewlineType
- fileIsDeleted :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool
- fileIsExternallyModified :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool
- fileIsLocal :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool
- fileIsReadonly :: (HasCallStack, MonadIO m, IsFile a) => a -> m Bool
- fileNew :: (HasCallStack, MonadIO m) => m File
- fileSetLocation :: (HasCallStack, MonadIO m, IsFile a, IsFile b) => a -> Maybe b -> m ()
- getFileCompressionType :: (MonadIO m, IsFile o) => o -> m CompressionType
- getFileEncoding :: (MonadIO m, IsFile o) => o -> m Encoding
- clearFileLocation :: (MonadIO m, IsFile o) => o -> m ()
- constructFileLocation :: (IsFile o, IsFile a) => a -> IO (GValueConstruct o)
- getFileLocation :: (MonadIO m, IsFile o) => o -> m File
- setFileLocation :: (MonadIO m, IsFile o, IsFile a) => o -> a -> m ()
- getFileNewlineType :: (MonadIO m, IsFile o) => o -> m NewlineType
- getFileReadOnly :: (MonadIO m, IsFile o) => o -> m Bool
Exported types
Constructors
| File (ManagedPtr File) |
Methods
checkFileOnDisk
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> 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 'GI.Gio.Objects.FileMonitor.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 |
|
| -> m CompressionType | Returns: the compression type. |
No description available in the introspection data.
Since: 3.14
getEncoding
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> m Encoding | Returns: the character encoding. |
getLocation
No description available in the introspection data.
Since: 3.14
getNewlineType
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> m NewlineType | Returns: the newline type. |
No description available in the introspection data.
Since: 3.14
isDeleted
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> 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 |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> m Bool | Returns: whether the file is local. |
isReadonly
Arguments
| :: (HasCallStack, MonadIO m, IsFile a) | |
| => a |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m File | Returns: a new |
No description available in the introspection data.
Since: 3.14
setLocation
Sets the location.
Since: 3.14
Properties
compressionType
getFileCompressionType :: (MonadIO m, IsFile o) => o -> m CompressionType Source #
encoding
location
clearFileLocation :: (MonadIO m, IsFile o) => o -> m () Source #
constructFileLocation :: (IsFile o, IsFile a) => a -> IO (GValueConstruct o) Source #
newlineType
getFileNewlineType :: (MonadIO m, IsFile o) => o -> m NewlineType Source #