Lines Matching refs:path

40 	char     *path;  member
53 if (pglob && pglob->path) { in _php_glob_stream_get_path()
57 return pglob->path; in _php_glob_stream_get_path()
108 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
110 const char *pos, *gpath = path; in php_glob_stream_path_split()
112 if ((pos = strrchr(path, '/')) != NULL) { in php_glob_stream_path_split()
113 path = pos+1; 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()
121 *p_file = path; in php_glob_stream_path_split()
124 if (pglob->path) { in php_glob_stream_path_split()
125 efree(pglob->path); in php_glob_stream_path_split()
127 if ((path - gpath) > 1) { in php_glob_stream_path_split()
128 path--; in php_glob_stream_path_split()
130 pglob->path_len = path - gpath; in php_glob_stream_path_split()
131 pglob->path = estrndup(gpath, pglob->path_len); in php_glob_stream_path_split()
140 const char *path; in php_glob_stream_read() local
150 … php_glob_stream_path_split(pglob, pglob->glob.gl_pathv[index], pglob->flags & GLOB_APPEND, &path); in php_glob_stream_read()
152 PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); in php_glob_stream_read()
156 if (pglob->path) { in php_glob_stream_read()
157 efree(pglob->path); in php_glob_stream_read()
158 pglob->path = NULL; in php_glob_stream_read()
173 if (pglob->path) { in php_glob_stream_close()
174 efree(pglob->path); in php_glob_stream_close()
194 if (pglob->path) { in php_glob_stream_rewind()
195 efree(pglob->path); in php_glob_stream_rewind()
196 pglob->path = NULL; in php_glob_stream_rewind()
214 static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, const char *path, const char… in php_glob_stream_opener() argument
221 if (!strncmp(path, "glob://", sizeof("glob://")-1)) { in php_glob_stream_opener()
222 path += sizeof("glob://")-1; in php_glob_stream_opener()
224 *opened_path = zend_string_init(path, strlen(path), 0); in php_glob_stream_opener()
230 if (0 != (ret = glob(path, pglob->flags & GLOB_FLAGMASK, NULL, &pglob->glob))) { in php_glob_stream_opener()
254 pos = path; in php_glob_stream_opener()
272 php_glob_stream_path_split(pglob, path, 1, &tmp); in php_glob_stream_opener()