af_history(3)

NAME

af_histories, af_access - AtFS history functions

SYNOPSIS

#include <atfs.h>

char**af_histories (char *path, char *pattern)

char**af_cachenames (char *path, char *pattern);

int   af_access (char *path, char *name, char *type, int mode)

DESCRIPTION

af_histories returns a list of source history names from the directory pointed to by path, that match the given pattern. Histories in a directory are represented by at least one version. The pattern must be ed(1) patterns, processable by re_comp(3) and re_exec(3). The resulting list of af_histories resides in allocated memory. Use free(3) to free the memory for further allocation. af_histories returns an empty list (not a NULL pointer !), when no histories are found.

af_cachenames does the same as af_histories but on derived object caches.

af_access determines the existence of an object history. If any ASO (any version) with the given path, name and type attributes exists, af_access returns zero, otherwise -1. The mode argument can either be

AF_CLASS_SOURCE
indicating that only source objects shall be searched or
AF_CLASS_DERIVED
which means that only the derived object cache shall be searched for existence of a matching ASO.

SEE ALSO

ed(1), re_comp(3), re_exec(3), free(3)

DIAGNOSTICS

Upon error, -1 or a null pointer (depending on the return type) is returned and af_errno is set to the corresponding error number.
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout