glob_expand


Description:

[ CCode ( array_length = false , array_null_terminated = true ) ]
[ Version ( since = "1.0.50" ) ]
public string[] glob_expand (string pattern, GlobExpand? optargs) throws Error

expand a wildcard path

This command searches for all the pathnames matching pattern according to the wildcard expansion rules used by the shell.

If no paths match, then this returns an empty list (note: not an error).

It is just a wrapper around the C glob(3) function with flags "GLOB_MARK|GLOB_BRACE". See that manual page for more details.

directoryslash controls whether use the GLOB_MARK flag for glob(3), and it defaults to true. It can be explicitly set as off to return no trailing slashes in filenames of directories.

Notice that there is no equivalent command for expanding a device name (eg. /dev/sd*). Use list_devices, list_partitions etc functions instead.

Parameters:

this

A GuestfsSession object

optargs

a GuestfsGlobExpand containing optional arguments

Returns:

an array of returned strings, or NULL on error




2022 vala-language.org