Lines Matching refs:path
44 char *path; member
54 if (pglob && pglob->path) { in _php_glob_stream_get_path()
59 return estrndup(pglob->path, pglob->path_len); in _php_glob_stream_get_path()
61 return pglob->path; in _php_glob_stream_get_path()
112 static void php_glob_stream_path_split(glob_s_t *pglob, char *path, int get_path, char **p_file TSR… in php_glob_stream_path_split() argument
114 char *pos, *gpath = path; in php_glob_stream_path_split()
116 if ((pos = strrchr(path, '/')) != NULL) { in php_glob_stream_path_split()
117 path = pos+1; in php_glob_stream_path_split()
120 if ((pos = strrchr(path, '\\')) != NULL) { in php_glob_stream_path_split()
121 path = pos+1; in php_glob_stream_path_split()
125 *p_file = path; in php_glob_stream_path_split()
128 if (pglob->path) { in php_glob_stream_path_split()
129 efree(pglob->path); in php_glob_stream_path_split()
131 if (path != gpath) { in php_glob_stream_path_split()
132 path--; in php_glob_stream_path_split()
134 pglob->path_len = path - gpath; in php_glob_stream_path_split()
135 pglob->path = estrndup(gpath, pglob->path_len); in php_glob_stream_path_split()
144 char *path; in php_glob_stream_read() local
149 …th_split(pglob, pglob->glob.gl_pathv[pglob->index++], pglob->flags & GLOB_APPEND, &path TSRMLS_CC); in php_glob_stream_read()
150 PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); in php_glob_stream_read()
154 if (pglob->path) { in php_glob_stream_read()
155 efree(pglob->path); in php_glob_stream_read()
156 pglob->path = NULL; in php_glob_stream_read()
171 if (pglob->path) { in php_glob_stream_close()
172 efree(pglob->path); in php_glob_stream_close()
189 if (pglob->path) { in php_glob_stream_rewind()
190 efree(pglob->path); in php_glob_stream_rewind()
191 pglob->path = NULL; in php_glob_stream_rewind()
209 static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *path, char *mode, in php_glob_stream_opener() argument
216 if (((options & STREAM_DISABLE_OPEN_BASEDIR) == 0) && php_check_open_basedir(path TSRMLS_CC)) { in php_glob_stream_opener()
220 if (!strncmp(path, "glob://", sizeof("glob://")-1)) { in php_glob_stream_opener()
221 path += sizeof("glob://")-1; in php_glob_stream_opener()
223 *opened_path = estrdup(path); in php_glob_stream_opener()
229 if (0 != (ret = glob(path, pglob->flags & GLOB_FLAGMASK, NULL, &pglob->glob))) { in php_glob_stream_opener()
239 pos = path; in php_glob_stream_opener()
257 php_glob_stream_path_split(pglob, path, 1, &tmp TSRMLS_CC); in php_glob_stream_opener()