StephenM Posted June 30, 2013 Share Posted June 30, 2013 Hi, Just on chapter 11. It was suggested I look up other functions and I've done that. Been looking at the glob() function and scandir() function a bit. Is there any major differences where one might use either function? Seems to me that a similar result could be achieved with either. Link to comment Share on other sites More sharing options...
HartleySan Posted June 30, 2013 Share Posted June 30, 2013 scandir returns an array of all the files and directories in a directory, and glob returns a similar array, but only of files that match a pattern. What exactly is your use case here? 2 Link to comment Share on other sites More sharing options...
StephenM Posted July 1, 2013 Author Share Posted July 1, 2013 Thanks Hartley, that pretty much answers my question. I haven't got a use case yet. So if I'm not mistaken a glob is sort of like a specialized scandir() that will narrow the scope of the result set. Link to comment Share on other sites More sharing options...
Larry Posted July 1, 2013 Share Posted July 1, 2013 Yes, that's exactly correct. Link to comment Share on other sites More sharing options...
Recommended Posts