The POSIX defined flags for bsd_glob() are: "GLOB_ERR" Force bsd_glob() to return an error when it encounters a directory it cannot open or read. Ordinarily bsd_glob() continues to find matches.