Lines Matching refs:file_name
88 if (intern->file_name) { in spl_filesystem_object_free_storage()
89 efree(intern->file_name); in spl_filesystem_object_free_storage()
205 if (!intern->file_name) { in spl_filesystem_object_get_file_name()
212 intern->file_name_len = spprintf(&intern->file_name, 0, "%s%c%s", in spl_filesystem_object_get_file_name()
277 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); in spl_filesystem_file_open()
280 intern->file_name = NULL; in spl_filesystem_file_open()
286 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
290 …meException, 0 TSRMLS_CC, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
292 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
301 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
307 intern->file_name = estrndup(intern->file_name, intern->file_name_len); in spl_filesystem_file_open()
353 intern->file_name = estrndup(source->file_name, intern->file_name_len); in spl_filesystem_object_clone()
390 if (intern->file_name) { in spl_filesystem_info_set_filename()
391 efree(intern->file_name); in spl_filesystem_info_set_filename()
394 intern->file_name = use_copy ? estrndup(path, len) : path; in spl_filesystem_info_set_filename()
397 while(IS_SLASH_AT(intern->file_name, intern->file_name_len-1) && intern->file_name_len > 1) { in spl_filesystem_info_set_filename()
398 intern->file_name[intern->file_name_len-1] = 0; in spl_filesystem_info_set_filename()
402 p1 = strrchr(intern->file_name, '/'); in spl_filesystem_info_set_filename()
404 p2 = strrchr(intern->file_name, '\\'); in spl_filesystem_info_set_filename()
409 intern->_path_len = (p1 > p2 ? p1 : p2) - intern->file_name; in spl_filesystem_info_set_filename()
497 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
501 intern->file_name = estrndup(source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
520 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
526 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
539 intern->file_name = NULL; in spl_filesystem_object_create_type()
573 return intern->file_name; in spl_filesystem_object_get_pathname()
578 return intern->file_name; in spl_filesystem_object_get_pathname()
614 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
619 …add_assoc_stringl_ex(&zrv, pnstr, pnlen+1, intern->file_name + path_len + 1, intern->file_name_len… in spl_filesystem_object_get_debug_info()
621 add_assoc_stringl_ex(&zrv, pnstr, pnlen+1, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_get_debug_info()
808 if (intern->file_name) { in SPL_METHOD()
809 efree(intern->file_name); in SPL_METHOD()
810 intern->file_name = NULL; in SPL_METHOD()
899 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1), 1); in SPL_METHOD()
901 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
937 fname = intern->file_name + path_len + 1; in SPL_METHOD()
940 fname = intern->file_name; in SPL_METHOD()
1008 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1011 fname = intern->file_name; in SPL_METHOD()
1074 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1091 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1161 php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \
1257 if (intern->file_name == NULL) { in FileInfoFunction()
1260 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1262 …if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND TSRMLS_CC)) { in FileInfoFunction()
1268 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1275 …imeException, 0 TSRMLS_CC, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1304 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1311 filename = intern->file_name; in SPL_METHOD()
1501 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC); in SPL_METHOD()
1506 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value TSRMLS_CC); in SPL_METHOD()
1527 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1532 ZVAL_STRINGL(zpath, intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1727 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1728 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1729 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1773 ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_data()
1800 *str_key = estrndup(object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_key()
1816 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1817 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1818 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1898 ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1902 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1930 ZEND_ARG_INFO(0, file_name)
2066 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read()
2199 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2273 …row_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2300 &intern->file_name, &intern->file_name_len, in SPL_METHOD()
2304 intern->file_name = NULL; in SPL_METHOD()
2361 intern->file_name = "php://memory"; in SPL_METHOD()
2365 intern->file_name = tmp_fname; in SPL_METHOD()
2367 intern->file_name = "php://temp"; in SPL_METHOD()
2874 …hrow_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
2892 …gicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); in SPL_METHOD()
2907 ZEND_ARG_INFO(0, file_name)