6 struct vsf_sysutil_dir
;
8 /* vsf_ls_populate_dir_list()
10 * Given a directory handle, populate a formatted directory entry list (/bin/ls
11 * format). Also optionally populate a list of subdirectories.
13 * p_list - the string list object for the result list of entries
14 * p_subdir_list - the string list object for the result list of
15 * subdirectories. May be 0 if client is not interested.
16 * p_dir - the directory object to be listed
17 * p_base_dir_str - the directory name we are listing, relative to current
18 * p_option_str - the string of options given to the LIST/NLST command
19 * p_filter_str - the filter string given to LIST/NLST - e.g. "*.mp3"
20 * is_verbose - set to 1 for LIST, 0 for NLST
22 void vsf_ls_populate_dir_list(struct mystr_list
* p_list
,
23 struct mystr_list
* p_subdir_list
,
24 struct vsf_sysutil_dir
* p_dir
,
25 const struct mystr
* p_base_dir_str
,
26 const struct mystr
* p_option_str
,
27 const struct mystr
* p_filter_str
,
30 /* vsf_filename_passes_filter()
32 * Determine whether the given filename is matched by the given filter string.
33 * The format of the filter string is a small subset of a regular expression.
34 * Currently, just * and ? are supported.
36 * p_filename_str - the filename to match
37 * p_filter_str - the filter to match against
38 * iters - pointer to a zero-seeded int which prevents the match
39 * loop from running an excessive number of times
41 * Returns 1 if there is a match, 0 otherwise.
43 int vsf_filename_passes_filter(const struct mystr
* p_filename_str
,
44 const struct mystr
* p_filter_str
,