I assume that you want to know how to pass this single path to the argv (type char const ** ) fts_open . This parameter is described as follows:
ARGV
Is NULL a complete array of character pointers, naming one or more paths that make up the file hierarchy.
So, you need to create an array of length 2, whose elements are of type char* . Put your path in the first element and put NULL in the second element. Like this:
char const *argv[] = { path, NULL };
Now you can pass argv to fts_open .
source share