resource_match


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "4.2" ) ]
public string[] resource_match (ResourceType type, string pattern, bool unique)

Tries to find all resources with the specified type.

The function will look into all specified directories and return all filenames in these directories. The returned filenames are given relative the base directories specified by type.

If pattern contains a trailing slash, resource_match looks only for directories that match pattern, else it'll only look for regular files. In case you are looking for directories, the returned entries will contain a trailing slash as well, so you can easily use them with other resource functions like resource_lookup or resource_save_location.

Example: xfce_resource_match (XFCE_RESOURCE_CONFIG, "foo/bar*") will probably return ("foo/bar", "foo/barbaz", ...).

Parameters:

type

type of the resource to locate directories for.

pattern

only accept filenames that fit to the pattern. The pattern needs to be a valid GPattern.

unique

if true, only return items which have unique suffixes.

Returns:

string array of all the relative paths whose names matches the given pattern. The return value has to be freed using strfreev when no longer needed.


Namespace: Xfce