-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathForEachFile.h
30 lines (25 loc) · 853 Bytes
/
ForEachFile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* This file is part of the auxiliaries library.
Written by Dick Grune, Vrije Universiteit, Amsterdam.
$Id: ForEachFile.h,v 1.6 2012-05-04 10:56:47 Gebruiker Exp $
*/
#include "fname.h"
#include <sys/types.h>
#include <sys/stat.h>
extern void ForEachFile(
const Fchar *fn,
void (*proc)(const Fchar *fn, const char *msg, const struct stat *fs)
);
extern void ForEachLocalFile(
const Fchar *fn,
void (*proc)(const Fchar *fn, const char *msg, const struct stat *fs)
);
/*
Each file reachable from fn is passed to the procedure proc, which
is declared as:
void proc(const Fchar *fn, const char *msg, const struct stat *fs)
The file fn is reached; if msg != NULL, an error prevails
the text of which is *msg; otherwise fs points to the
stat buffer for fn.
ForEachLocalFile() restricts itself to the directory fn and its
local contents.
*/