Hello
I have a fairly simple routine that reads all entries for a directory and then, if the filename starts with a specific value, acts upon that file.
Unfortunately, the directory is now getting large and reading all files to search for the ones I want to process takes too long. I have tried changing my readdir() to only read certain files e.g. readdir('/home/name*'), but this doesn't work.
Can anyone help or suggest an alternative way of doing this please?
Many thanks
Gary
I have a fairly simple routine that reads all entries for a directory and then, if the filename starts with a specific value, acts upon that file.
Unfortunately, the directory is now getting large and reading all files to search for the ones I want to process takes too long. I have tried changing my readdir() to only read certain files e.g. readdir('/home/name*'), but this doesn't work.
Can anyone help or suggest an alternative way of doing this please?
Many thanks
Gary