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()
208 if (!intern->file_name) { in spl_filesystem_object_get_file_name()
213 if (intern->file_name) { in spl_filesystem_object_get_file_name()
214 efree(intern->file_name); in spl_filesystem_object_get_file_name()
216 intern->file_name_len = spprintf(&intern->file_name, 0, "%s%c%s", in spl_filesystem_object_get_file_name()
280 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp TSRMLS_CC); in spl_filesystem_file_open()
283 intern->file_name = NULL; in spl_filesystem_file_open()
289 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
293 …meException, 0 TSRMLS_CC, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
295 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
304 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
310 intern->file_name = estrndup(intern->file_name, intern->file_name_len); in spl_filesystem_file_open()
356 intern->file_name = estrndup(source->file_name, intern->file_name_len); in spl_filesystem_object_clone()
393 if (intern->file_name) { in spl_filesystem_info_set_filename()
394 efree(intern->file_name); in spl_filesystem_info_set_filename()
397 intern->file_name = use_copy ? estrndup(path, len) : path; in spl_filesystem_info_set_filename()
400 while(IS_SLASH_AT(intern->file_name, intern->file_name_len-1) && intern->file_name_len > 1) { in spl_filesystem_info_set_filename()
401 intern->file_name[intern->file_name_len-1] = 0; in spl_filesystem_info_set_filename()
405 p1 = strrchr(intern->file_name, '/'); in spl_filesystem_info_set_filename()
407 p2 = strrchr(intern->file_name, '\\'); in spl_filesystem_info_set_filename()
412 intern->_path_len = (p1 > p2 ? p1 : p2) - intern->file_name; in spl_filesystem_info_set_filename()
500 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
504 intern->file_name = estrndup(source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
523 ZVAL_STRINGL(arg1, source->file_name, source->file_name_len, 1); in spl_filesystem_object_create_type()
529 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
542 intern->file_name = NULL; in spl_filesystem_object_create_type()
576 return intern->file_name; in spl_filesystem_object_get_pathname()
581 return intern->file_name; in spl_filesystem_object_get_pathname()
617 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
622 …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()
624 add_assoc_stringl_ex(&zrv, pnstr, pnlen+1, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_get_debug_info()
811 if (intern->file_name) { in SPL_METHOD()
812 efree(intern->file_name); in SPL_METHOD()
813 intern->file_name = NULL; in SPL_METHOD()
903 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1), 1); in SPL_METHOD()
905 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
941 fname = intern->file_name + path_len + 1; in SPL_METHOD()
944 fname = intern->file_name; in SPL_METHOD()
1012 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1015 fname = intern->file_name; in SPL_METHOD()
1078 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1095 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1165 php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \
1261 if (intern->file_name == NULL) { in FileInfoFunction()
1264 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1266 …if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND TSRMLS_CC)) { in FileInfoFunction()
1272 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1279 …imeException, 0 TSRMLS_CC, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1308 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1315 filename = intern->file_name; in SPL_METHOD()
1505 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC); in SPL_METHOD()
1510 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value TSRMLS_CC); in SPL_METHOD()
1533 ZVAL_STRINGL(zpath, intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1726 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1727 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1728 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1772 ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_data()
1797 ZVAL_STRINGL(key, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_key()
1812 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1813 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1814 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1894 ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1898 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1929 ZEND_ARG_INFO(0, file_name)
2065 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read()
2198 …_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2276 …row_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2303 &intern->file_name, &intern->file_name_len, in SPL_METHOD()
2307 intern->file_name = NULL; in SPL_METHOD()
2364 intern->file_name = "php://memory"; in SPL_METHOD()
2368 intern->file_name = tmp_fname; in SPL_METHOD()
2370 intern->file_name = "php://temp"; in SPL_METHOD()
2989 …hrow_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
3012 …gicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); in SPL_METHOD()
3027 ZEND_ARG_INFO(0, file_name)