gfs_glob(3)

gfs_glob3

Find path names matching a pattern

Usage

#include <gfarm/gfarm.h>

char *gfs_glob (const char * pattern, gfarm_stringlist * paths, gfs_glob_t * types);

Overview

gfs_glob() searches for all the path names matching pattern that may include a wildcard, and returns paths.

The returned path names are accessed by gfarm_stringlist_length(3) and gfarm_stringlist_elem(3).

It is necessary to allocate memory space dynamically pointed to by types using gfs_glob_init(3) before calling gfs_glob(3). The allocated memory space needs to be free'ed by gfs_glob_free(3).

Return values

NULL

The function terminated successfully.

GFARM_ERR_NO_MEMORY

Insufficient memory was available.

GFARM_ERR_PATHNAME_TOO_LONG

Too long pattern or path name to process.

Others

An error except the above occurred. The reason is shown by its pointed strings.

Releases

Unchanged in 2 releases since Debian 6.0 (Squeeze).

  1. 6.0–7

From libgfarm-dev 2.4.1-1.1 in Debian 7 (Wheezy). Parsed by carta from the page's man source.