| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gio.Structs.FileAttributeMatcher
Description
Determines if a string matches a file attribute.
Synopsis
- newtype FileAttributeMatcher = FileAttributeMatcher (ManagedPtr FileAttributeMatcher)
- type family ResolveFileAttributeMatcherMethod (t :: Symbol) o where ...
- data FileAttributeMatcherEnumerateNamespaceMethodInfo
- fileAttributeMatcherEnumerateNamespace :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool
- data FileAttributeMatcherEnumerateNextMethodInfo
- fileAttributeMatcherEnumerateNext :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m (Maybe Text)
- data FileAttributeMatcherMatchesMethodInfo
- fileAttributeMatcherMatches :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool
- data FileAttributeMatcherMatchesOnlyMethodInfo
- fileAttributeMatcherMatchesOnly :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> Text -> m Bool
- fileAttributeMatcherNew :: (HasCallStack, MonadIO m) => Text -> m FileAttributeMatcher
- data FileAttributeMatcherRefMethodInfo
- fileAttributeMatcherRef :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m FileAttributeMatcher
- data FileAttributeMatcherSubtractMethodInfo
- fileAttributeMatcherSubtract :: (HasCallStack, MonadIO m) => Maybe FileAttributeMatcher -> Maybe FileAttributeMatcher -> m (Maybe FileAttributeMatcher)
- data FileAttributeMatcherToStringMethodInfo
- fileAttributeMatcherToString :: (HasCallStack, MonadIO m) => Maybe FileAttributeMatcher -> m Text
- data FileAttributeMatcherUnrefMethodInfo
- fileAttributeMatcherUnref :: (HasCallStack, MonadIO m) => FileAttributeMatcher -> m ()
Exported types
newtype FileAttributeMatcher Source #
Memory-managed wrapper type.
Constructors
| FileAttributeMatcher (ManagedPtr FileAttributeMatcher) |
Instances
Methods
Click to display all available methods, including inherited ones
Methods
enumerateNamespace, enumerateNext, matches, matchesOnly, ref, subtract, toString, unref.
Getters
None.
Setters
None.
type family ResolveFileAttributeMatcherMethod (t :: Symbol) o where ... Source #
Equations
| ResolveFileAttributeMatcherMethod "enumerateNamespace" o = FileAttributeMatcherEnumerateNamespaceMethodInfo | |
| ResolveFileAttributeMatcherMethod "enumerateNext" o = FileAttributeMatcherEnumerateNextMethodInfo | |
| ResolveFileAttributeMatcherMethod "matches" o = FileAttributeMatcherMatchesMethodInfo | |
| ResolveFileAttributeMatcherMethod "matchesOnly" o = FileAttributeMatcherMatchesOnlyMethodInfo | |
| ResolveFileAttributeMatcherMethod "ref" o = FileAttributeMatcherRefMethodInfo | |
| ResolveFileAttributeMatcherMethod "subtract" o = FileAttributeMatcherSubtractMethodInfo | |
| ResolveFileAttributeMatcherMethod "toString" o = FileAttributeMatcherToStringMethodInfo | |
| ResolveFileAttributeMatcherMethod "unref" o = FileAttributeMatcherUnrefMethodInfo | |
| ResolveFileAttributeMatcherMethod l o = MethodResolutionFailed l o :: Type |
enumerateNamespace
data FileAttributeMatcherEnumerateNamespaceMethodInfo Source #
Instances
| (signature ~ (Text -> m Bool), MonadIO m) => OverloadedMethod FileAttributeMatcherEnumerateNamespaceMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherEnumerateNamespaceMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherEnumerateNamespace Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> Text |
|
| -> m Bool | Returns: |
Checks if the matcher will match all of the keys in a given namespace.
This will always return True if a wildcard character is in use (e.g. if
matcher was created with "standard::*" and ns is "standard", or if matcher was created
using "*" and namespace is anything.)
TODO: this is awkwardly worded.
enumerateNext
data FileAttributeMatcherEnumerateNextMethodInfo Source #
Instances
| (signature ~ m (Maybe Text), MonadIO m) => OverloadedMethod FileAttributeMatcherEnumerateNextMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherEnumerateNextMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherEnumerateNext Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> m (Maybe Text) | Returns: a string containing the next attribute or, |
Gets the next matched attribute from a FileAttributeMatcher.
matches
data FileAttributeMatcherMatchesMethodInfo Source #
Instances
| (signature ~ (Text -> m Bool), MonadIO m) => OverloadedMethod FileAttributeMatcherMatchesMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherMatchesMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherMatches Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> Text |
|
| -> m Bool | Returns: |
Checks if an attribute will be matched by an attribute matcher. If
the matcher was created with the "*" matching string, this function
will always return True.
matchesOnly
data FileAttributeMatcherMatchesOnlyMethodInfo Source #
Instances
| (signature ~ (Text -> m Bool), MonadIO m) => OverloadedMethod FileAttributeMatcherMatchesOnlyMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherMatchesOnlyMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherMatchesOnly Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> Text |
|
| -> m Bool | Returns: |
Checks if an attribute matcher only matches a given attribute. Always
returns False if "*" was used when creating the matcher.
new
fileAttributeMatcherNew Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m FileAttributeMatcher | Returns: a |
Creates a new file attribute matcher, which matches attributes
against a given string. GFileAttributeMatchers are reference
counted structures, and are created with a reference count of 1. If
the number of references falls to 0, the FileAttributeMatcher is
automatically destroyed.
The attributes string should be formatted with specific keys separated
from namespaces with a double colon. Several "namespacekey" strings may be
concatenated with a single comma (e.g. "standardtype,standardisHidden").
The wildcard "*" may be used to match all keys and namespaces, or
"namespace::*" will match all keys in a given namespace.
Examples of file attribute matcher strings and results
"*": matches all attributes."standard::is-hidden": matches only the key is-hidden in the standard namespace."standard::type,unix::*": matches the type key in the standard namespace and all keys in the unix namespace.
ref
data FileAttributeMatcherRefMethodInfo Source #
Instances
| (signature ~ m FileAttributeMatcher, MonadIO m) => OverloadedMethod FileAttributeMatcherRefMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherRefMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherRef Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> m FileAttributeMatcher | Returns: a |
References a file attribute matcher.
subtract
data FileAttributeMatcherSubtractMethodInfo Source #
Instances
| (signature ~ (Maybe FileAttributeMatcher -> m (Maybe FileAttributeMatcher)), MonadIO m) => OverloadedMethod FileAttributeMatcherSubtractMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherSubtractMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherSubtract Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe FileAttributeMatcher |
|
| -> Maybe FileAttributeMatcher |
|
| -> m (Maybe FileAttributeMatcher) | Returns: A file attribute matcher matching all attributes of
|
Subtracts all attributes of subtract from matcher and returns
a matcher that supports those attributes.
Note that currently it is not possible to remove a single
attribute when the matcher matches the whole namespace - or remove
a namespace or attribute when the matcher matches everything. This
is a limitation of the current implementation, but may be fixed
in the future.
toString
data FileAttributeMatcherToStringMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m) => OverloadedMethod FileAttributeMatcherToStringMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherToStringMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherToString Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe FileAttributeMatcher |
|
| -> m Text | Returns: a string describing the attributes the matcher matches
against or |
Prints what the matcher is matching against. The format will be
equal to the format passed to fileAttributeMatcherNew.
The output however, might not be identical, as the matcher may
decide to use a different order or omit needless parts.
Since: 2.32
unref
data FileAttributeMatcherUnrefMethodInfo Source #
Instances
| (signature ~ m (), MonadIO m) => OverloadedMethod FileAttributeMatcherUnrefMethodInfo FileAttributeMatcher signature Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods overloadedMethod :: FileAttributeMatcher -> signature # | |
| OverloadedMethodInfo FileAttributeMatcherUnrefMethodInfo FileAttributeMatcher Source # | |
Defined in GI.Gio.Structs.FileAttributeMatcher Methods | |
fileAttributeMatcherUnref Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => FileAttributeMatcher |
|
| -> m () |
Unreferences matcher. If the reference count falls below 1,
the matcher is automatically freed.