Lines Matching refs:file_name
119 if (intern->file_name) { in spl_filesystem_object_free_storage()
120 efree(intern->file_name); in spl_filesystem_object_free_storage()
209 if (!intern->file_name) { in spl_filesystem_object_get_file_name()
217 if (intern->file_name) { in spl_filesystem_object_get_file_name()
218 efree(intern->file_name); in spl_filesystem_object_get_file_name()
223 &intern->file_name, 0, "%s", intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
226 &intern->file_name, 0, "%s%c%s", path, slash, intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
290 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp); in spl_filesystem_file_open()
293 intern->file_name = NULL; in spl_filesystem_file_open()
299 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
303 …l_ce_RuntimeException, 0, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
305 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
317 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
323 intern->file_name = estrndup(intern->file_name, intern->file_name_len); in spl_filesystem_file_open()
368 intern->file_name = estrndup(source->file_name, intern->file_name_len); in spl_filesystem_object_clone()
404 if (intern->file_name) { in spl_filesystem_info_set_filename()
405 efree(intern->file_name); in spl_filesystem_info_set_filename()
408 intern->file_name = use_copy ? estrndup(path, len) : path; in spl_filesystem_info_set_filename()
411 while (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_info_set_filename()
412 intern->file_name[intern->file_name_len-1] = 0; in spl_filesystem_info_set_filename()
416 p1 = strrchr(intern->file_name, '/'); in spl_filesystem_info_set_filename()
418 p2 = strrchr(intern->file_name, '\\'); in spl_filesystem_info_set_filename()
423 intern->_path_len = ((p1 > p2 ? p1 : p2) - intern->file_name); in spl_filesystem_info_set_filename()
511 ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
515 intern->file_name = estrndup(source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
535 ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
541 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
554 intern->file_name = NULL; in spl_filesystem_object_create_type()
588 return intern->file_name; in spl_filesystem_object_get_pathname()
593 return intern->file_name; in spl_filesystem_object_get_pathname()
625 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
630 ZVAL_STRINGL(&tmp, intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in spl_filesystem_object_get_debug_info()
632 ZVAL_STRINGL(&tmp, intern->file_name, intern->file_name_len); in spl_filesystem_object_get_debug_info()
829 if (intern->file_name) { in SPL_METHOD()
830 efree(intern->file_name); in SPL_METHOD()
831 intern->file_name = NULL; in SPL_METHOD()
913 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in SPL_METHOD()
915 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
953 fname = intern->file_name + path_len + 1; in SPL_METHOD()
956 fname = intern->file_name; in SPL_METHOD()
1018 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1021 fname = intern->file_name; in SPL_METHOD()
1082 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
1099 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
1160 php_stat(intern->file_name, intern->file_name_len, func_num, return_value); \
1255 if (intern->file_name == NULL) { in FileInfoFunction()
1259 if (intern->file_name == NULL) { in FileInfoFunction()
1262 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1264 if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND )) { in FileInfoFunction()
1270 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1277 …pl_ce_RuntimeException, 0, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1306 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1313 filename = intern->file_name; in SPL_METHOD()
1503 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value); in SPL_METHOD()
1508 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value); in SPL_METHOD()
1529 ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len); in SPL_METHOD()
1714 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1715 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1716 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1760 ZVAL_STRINGL(&iterator->current, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_data()
1784 ZVAL_STRINGL(key, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_key()
1799 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1800 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1801 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1878 ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len); in spl_filesystem_object_cast()
1882 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len); in spl_filesystem_object_cast()
1913 ZEND_ARG_INFO(0, file_name)
2049 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read()
2181 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2267 zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2292 &intern->file_name, &intern->file_name_len, in SPL_METHOD()
2296 intern->file_name = NULL; in SPL_METHOD()
2351 intern->file_name = "php://memory"; in SPL_METHOD()
2355 intern->file_name = tmp_fname; in SPL_METHOD()
2357 intern->file_name = "php://temp"; in SPL_METHOD()
2978 zend_throw_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
3001 …icException, 0, "Can't seek file %s to negative line " ZEND_LONG_FMT, intern->file_name, line_pos); in SPL_METHOD()
3016 ZEND_ARG_INFO(0, file_name)