Query: xtfilepredicate
OS: hpux
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
XtFilePredicate() XtFilePredicate() Name XtFilePredicate - interface definition for a filename evaluation procedure. Synopsis typedef Boolean (*XtFilePredicate)(String); String filename; Inputs filename Specifies a potential filename. Returns True if filename is acceptable; False otherwise. Description An XtFilePredicate is specified in calls to XtResolvePathname() and XtFindFile(), and is called to judge filenames found by those proce- dures. If the string is appropriate for the intended use (if it names a readable file, for example) then the XtFilePredicate should return True; otherwise it should return False. Example The default predicate used by XtResolvePathname() and XtFindFile() simply tests that the specified filename exists, is readable, and is not a directory. This default procedure is shown below. Note that it attempts to handle some operating system dependencies. static Boolean TestFile(path) String path; { #ifdef VMS return TRUE; /* Who knows what to do here? */ #else struct stat status; return (access(path, R_OK) == 0 && /* exists and is readable */ stat(path, &status) == 0 && /* get the status */ #ifndef X_NOT_POSIX S_ISDIR(status.st_mode) == 0); /* not a directory */ #else (status.st_mode & S_IFDIR) == 0); /* not a directory */ #endif /* X_NOT_POSIX else */ #endif /* VMS */ } See Also XtFindFile(1), XtResolvePathname(1). Xt - File Searching XtFilePredicate()
Related Man Pages |
---|
xtfindfile(3xt) - redhat |
xtfindfile(3) - centos |
xtresolvepathname(3) - centos |
xtfindfile(3xt) - xfree86 |
xtfindfile(1) - hpux |
Similar Topics in the Unix Linux Community |
---|
How to list file size on HPUX? |
How to extract every repeated string between two specific string? |
Hpux 11iV3 administration document |
Seeking Alternative for diff in hp |