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()
157 if (pglob->path) { in php_glob_stream_read()
158 efree(pglob->path); in php_glob_stream_read()
159 pglob->path = NULL; in php_glob_stream_read()
174 if (pglob->path) { in php_glob_stream_close()
175 efree(pglob->path); in php_glob_stream_close()
195 if (pglob->path) { in php_glob_stream_rewind()
196 efree(pglob->path); in php_glob_stream_rewind()
197 pglob->path = NULL; in php_glob_stream_rewind()
215 static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, const char *path, const char… in php_glob_stream_opener() argument
222 if (!strncmp(path, "glob://", sizeof("glob://")-1)) { in php_glob_stream_opener()
223 path += sizeof("glob://")-1; in php_glob_stream_opener()
225 *opened_path = zend_string_init(path, strlen(path), 0); in php_glob_stream_opener()
228 const char *pattern = path; in php_glob_stream_opener()
234 if (!IS_ABSOLUTE_PATH(path, strlen(path))) { in php_glob_stream_opener()
240 if (IS_SLASH(*path)) { in php_glob_stream_opener()
246 snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH, path); in php_glob_stream_opener()
292 pos = path; in php_glob_stream_opener()
310 php_glob_stream_path_split(pglob, path, 1, &tmp); in php_glob_stream_opener()