glob64

Name

glob64 -- find pathnames matching a pattern (Large File Support)

Synopsis

#include <glob.h>

int glob64(const char * pattern, int flags, int (*errfunc) (const char *, int), glob64_t * pglob);

Description

glob64() is a large-file version of the glob() function defined in POSIX 1003.1-2008 (ISO/IEC 9945-2009). It shall search for pathnames matching pattern according to the rules used by the shell, /bin/sh. No tilde expansion or parameter substitution is done; see wordexp().

The results of a glob64() call are stored in the structure pointed to by pglob, which is a glob64_t declared in glob.h with the following members:

typedef struct
{
  size_t gl_pathc;
  char **gl_pathv;
  size_t gl_offs;
  int gl_flags;
  void (*gl_closedir) (void *);
  struct dirent64 *(*gl_readdir64) (void *);
  void *(*gl_opendir) (const char *);
  int (*gl_lstat) (const char *, struct stat *);
  int (*gl_stat) (const char *, struct stat *);
}
glob64_t;

Structure members with the same name as corresponding members of a glob_t as defined in POSIX 1003.1-2008 (ISO/IEC 9945-2009) shall have the same purpose.

Other members are defined as follows:

gl_flags 

reserved for internal use

gl_closedir 

pointer to a function capable of closing a directory opened by gl_opendir

gl_readdir64 

pointer to a function capable of reading entries in a large directory

gl_opendir 

pointer to a function capable of opening a large directory

gl_stat 

pointer to a function capable of returning file status for a large file

gl_lstat 

pointer to a function capable of returning file status information for a large file or symbolic link

A large file or large directory is one with a size which cannot be represented by a variable of type off_t.

Return Value

On success, 0 is returned. Other possible returns are:

GLOB_NOSPACE 

out of memory

GLOB_ABORTED 

read error

GLOB_NOMATCH 

no match found