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()
902 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1), 1); in SPL_METHOD()
904 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
940 fname = intern->file_name + path_len + 1; in SPL_METHOD()
943 fname = intern->file_name; in SPL_METHOD()
1011 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1014 fname = intern->file_name; in SPL_METHOD()
1077 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1094 RETURN_STRINGL(intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1164 php_stat(intern->file_name, intern->file_name_len, func_num, return_value TSRMLS_CC); \
1260 if (intern->file_name == NULL) { in FileInfoFunction()
1263 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1265 …if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND TSRMLS_CC)) { in FileInfoFunction()
1271 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1278 …imeException, 0 TSRMLS_CC, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1307 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1314 filename = intern->file_name; in SPL_METHOD()
1504 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value TSRMLS_CC); in SPL_METHOD()
1509 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value TSRMLS_CC); in SPL_METHOD()
1532 ZVAL_STRINGL(zpath, intern->file_name, intern->file_name_len, 1); in SPL_METHOD()
1725 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1726 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1727 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1771 ZVAL_STRINGL(iterator->current, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_data()
1796 ZVAL_STRINGL(key, object->file_name, object->file_name_len, 1); in spl_filesystem_tree_it_current_key()
1811 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1812 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1813 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1893 ZVAL_STRINGL(retval_ptr, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1897 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len, 1); in spl_filesystem_object_cast()
1928 ZEND_ARG_INFO(0, file_name)
2064 …_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()
2905 …hrow_exception_ex(spl_ce_LogicException, 0 TSRMLS_CC, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
2923 …gicException, 0 TSRMLS_CC, "Can't seek file %s to negative line %ld", intern->file_name, line_pos); in SPL_METHOD()
2938 ZEND_ARG_INFO(0, file_name)