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()
206 if (!intern->file_name) { in spl_filesystem_object_get_file_name()
213 intern->file_name_len = spprintf(&intern->file_name, 0, "%s%c%s", in spl_filesystem_object_get_file_name()
278 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); in spl_filesystem_file_open()
281 intern->file_name = NULL; in spl_filesystem_file_open()
287 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
291 …meException, 0 TSRMLS_CC, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
293 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
302 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
308 intern->file_name = estrndup(intern->file_name, intern->file_name_len); in spl_filesystem_file_open()
354 intern->file_name = estrndup(source->file_name, intern->file_name_len); in spl_filesystem_object_clone()
391 if (intern->file_name) { in spl_filesystem_info_set_filename()
392 efree(intern->file_name); in spl_filesystem_info_set_filename()
395 intern->file_name = use_copy ? estrndup(path, len) : path; in spl_filesystem_info_set_filename()
398 while(IS_SLASH_AT(intern->file_name, intern->file_name_len-1) && intern->file_name_len > 1) { in spl_filesystem_info_set_filename()
399 intern->file_name[intern->file_name_len-1] = 0; in spl_filesystem_info_set_filename()
403 p1 = strrchr(intern->file_name, '/'); in spl_filesystem_info_set_filename()
405 p2 = strrchr(intern->file_name, '\\'); in spl_filesystem_info_set_filename()
410 intern->_path_len = (p1 > p2 ? p1 : p2) - intern->file_name; in spl_filesystem_info_set_filename()
498 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
502 intern->file_name = estrndup(source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
521 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
527 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
540 intern->file_name = NULL; in spl_filesystem_object_create_type()
574 return intern->file_name; in spl_filesystem_object_get_pathname()
579 return intern->file_name; in spl_filesystem_object_get_pathname()
611 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
616 …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()
618 add_assoc_stringl_ex(&zrv, pnstr, pnlen+1, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_get_debug_info()
798 if (intern->file_name) { in SPL_METHOD()
799 efree(intern->file_name); in SPL_METHOD()
800 intern->file_name = NULL; in SPL_METHOD()
889 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1), 1); in SPL_METHOD()
891 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
927 fname = intern->file_name + path_len + 1; in SPL_METHOD()
930 fname = intern->file_name; in SPL_METHOD()
998 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1001 fname = intern->file_name; in SPL_METHOD()
1064 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1081 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1151 php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \
1247 if (intern->file_name == NULL) { in FileInfoFunction()
1250 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1256 if (!expand_filepath(intern->file_name, expanded_path TSRMLS_CC)) { in FileInfoFunction()
1262 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1269 …imeException, 0 TSRMLS_CC, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1298 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1305 filename = intern->file_name; in SPL_METHOD()
1495 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC); in SPL_METHOD()
1500 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value TSRMLS_CC); in SPL_METHOD()
1521 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1526 ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len, 0); in SPL_METHOD()
1719 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1720 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1721 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1765 ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_data()
1792 *str_key = estrndup(object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_key()
1808 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1809 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1810 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1890 ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1894 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1922 ZEND_ARG_INFO(0, file_name)
2059 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read()
2197 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2271 …row_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2298 &intern->file_name, &intern->file_name_len, in SPL_METHOD()
2302 intern->file_name = NULL; in SPL_METHOD()
2359 intern->file_name = "php://memory"; in SPL_METHOD()
2363 intern->file_name = tmp_fname; in SPL_METHOD()
2365 intern->file_name = "php://temp"; in SPL_METHOD()
2842 …hrow_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
2860 …gicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); in SPL_METHOD()
2875 ZEND_ARG_INFO(0, file_name)