Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

Using wildcard with readdir()

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using wildcard with readdir()

    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
Working...
X