Search for in sub-directories

Hi.

Can someone tell me how to search for all CSV files in a directory and its sub-directories? I know how to do this in Cygwin (with “find”), but I’d like to be able to implement it in my C code.

Regards,
Jim
I’d like to be able to implement it in my C code.

Then you have to write a file system driver. Otherwise, all you can do is making a system call (the linux kernel makes kernel traps available on the X86 arch by the call gate int 80h, so there you can (a) set the appropriate parameters in the registers (there is no fun in doing it yourself if I have to tell you these...) and (b) create an int 80h (via asm). The interrupt handler then checks your privileges and (if high enough) grants you access via a return from the handler with eax set appropriately)
Topic archived. No new replies allowed.