Lines Matching refs:path
40 char *path; member
50 if (pglob && pglob->path) { in _php_glob_stream_get_path()
54 return pglob->path; in _php_glob_stream_get_path()
100 static void php_glob_stream_path_split(glob_s_t *pglob, const char *path, int get_path, const char … in php_glob_stream_path_split() argument
102 const char *pos, *gpath = path; in php_glob_stream_path_split()
104 if ((pos = strrchr(path, '/')) != NULL) { in php_glob_stream_path_split()
105 path = pos+1; in php_glob_stream_path_split()
108 if ((pos = strrchr(path, '\\')) != NULL) { in php_glob_stream_path_split()
109 path = pos+1; in php_glob_stream_path_split()
113 *p_file = path; in php_glob_stream_path_split()
116 if (pglob->path) { in php_glob_stream_path_split()
117 efree(pglob->path); in php_glob_stream_path_split()
119 if ((path - gpath) > 1) { in php_glob_stream_path_split()
120 path--; in php_glob_stream_path_split()
122 pglob->path_len = path - gpath; in php_glob_stream_path_split()
123 pglob->path = estrndup(gpath, pglob->path_len); in php_glob_stream_path_split()
132 const char *path; in php_glob_stream_read() local
137 …_stream_path_split(pglob, pglob->glob.gl_pathv[pglob->index++], pglob->flags & GLOB_APPEND, &path); in php_glob_stream_read()
138 PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); in php_glob_stream_read()
142 if (pglob->path) { in php_glob_stream_read()
143 efree(pglob->path); in php_glob_stream_read()
144 pglob->path = NULL; in php_glob_stream_read()
159 if (pglob->path) { in php_glob_stream_close()
160 efree(pglob->path); in php_glob_stream_close()
177 if (pglob->path) { in php_glob_stream_rewind()
178 efree(pglob->path); in php_glob_stream_rewind()
179 pglob->path = NULL; in php_glob_stream_rewind()
197 static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, const char *path, const char… in php_glob_stream_opener() argument
204 if (!strncmp(path, "glob://", sizeof("glob://")-1)) { in php_glob_stream_opener()
205 path += sizeof("glob://")-1; in php_glob_stream_opener()
207 *opened_path = zend_string_init(path, strlen(path), 0); in php_glob_stream_opener()
211 if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path)) { in php_glob_stream_opener()
217 if (0 != (ret = glob(path, pglob->flags & GLOB_FLAGMASK, NULL, &pglob->glob))) { in php_glob_stream_opener()
227 pos = path; in php_glob_stream_opener()
245 php_glob_stream_path_split(pglob, path, 1, &tmp); in php_glob_stream_opener()