Lines Matching refs:file_name

152 	if (intern->file_name) {  in spl_filesystem_object_free_storage()
153 zend_string_release(intern->file_name); in spl_filesystem_object_free_storage()
232 if (intern->file_name) { in spl_filesystem_object_get_file_name()
251 intern->file_name = zend_string_init(intern->u.dir.entry.d_name, name_len, 0); in spl_filesystem_object_get_file_name()
256 intern->file_name = zend_string_concat3( in spl_filesystem_object_get_file_name()
268 if (intern->file_name) { in spl_filesystem_dir_read()
270 zend_string_release(intern->file_name); in spl_filesystem_dir_read()
271 intern->file_name = NULL; in spl_filesystem_dir_read()
329 php_stat(intern->file_name, FS_IS_DIR, &tmp); in spl_filesystem_file_open()
333 intern->file_name = NULL; in spl_filesystem_file_open()
339 …intern->u.file.stream = php_stream_open_wrapper_ex(ZSTR_VAL(intern->file_name), ZSTR_VAL(intern->u… in spl_filesystem_file_open()
341 if (!ZSTR_LEN(intern->file_name) || !intern->u.file.stream) { in spl_filesystem_file_open()
343 …row_exception_ex(spl_ce_RuntimeException, 0, "Cannot open file '%s'", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_open()
347 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
361 …if (ZSTR_LEN(intern->file_name) > 1 && IS_SLASH_AT(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->f… in spl_filesystem_file_open()
362 …intern->file_name = zend_string_init(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->file_name)-1, 0… in spl_filesystem_file_open()
364 intern->file_name = zend_string_copy(intern->file_name); in spl_filesystem_file_open()
409 if (source->file_name != NULL) { in spl_filesystem_object_clone()
410 intern->file_name = zend_string_copy(source->file_name); in spl_filesystem_object_clone()
449 if (intern->file_name) { in spl_filesystem_info_set_filename()
450 zend_string_release(intern->file_name); in spl_filesystem_info_set_filename()
458 intern->file_name = zend_string_init(ZSTR_VAL(path), path_len, 0); in spl_filesystem_info_set_filename()
460 intern->file_name = zend_string_copy(path); in spl_filesystem_info_set_filename()
528 ZVAL_STR_COPY(&arg1, source->file_name); in spl_filesystem_object_create_type()
532 intern->file_name = zend_string_copy(source->file_name); in spl_filesystem_object_create_type()
557 ZVAL_STR_COPY(&arg1, source->file_name); in spl_filesystem_object_create_type()
563 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
597 return intern->file_name; in spl_filesystem_object_get_pathname()
601 return intern->file_name; in spl_filesystem_object_get_pathname()
629 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
631 if (path && ZSTR_LEN(path) && ZSTR_LEN(path) < ZSTR_LEN(intern->file_name)) { in spl_filesystem_object_get_debug_info()
633 …ZVAL_STRINGL(&tmp, ZSTR_VAL(intern->file_name) + ZSTR_LEN(path) + 1, ZSTR_LEN(intern->file_name) -… in spl_filesystem_object_get_debug_info()
635 ZVAL_STR_COPY(&tmp, intern->file_name); in spl_filesystem_object_get_debug_info()
803 if (intern->file_name) { in PHP_METHOD()
804 zend_string_release(intern->file_name); in PHP_METHOD()
805 intern->file_name = NULL; in PHP_METHOD()
883 if (!intern->file_name) { in PHP_METHOD()
890 if (path && ZSTR_LEN(path) && ZSTR_LEN(path) < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
893 RETVAL_STRINGL(ZSTR_VAL(intern->file_name) + path_len, ZSTR_LEN(intern->file_name) - path_len); in PHP_METHOD()
895 RETVAL_STR_COPY(intern->file_name); in PHP_METHOD()
932 if (!intern->file_name) { in PHP_METHOD()
939 if (path && ZSTR_LEN(path) && ZSTR_LEN(path) < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
940 fname = ZSTR_VAL(intern->file_name) + ZSTR_LEN(path) + 1; in PHP_METHOD()
941 flen = ZSTR_LEN(intern->file_name) - (ZSTR_LEN(path) + 1); in PHP_METHOD()
943 fname = ZSTR_VAL(intern->file_name); in PHP_METHOD()
944 flen = ZSTR_LEN(intern->file_name); in PHP_METHOD()
1005 if (!intern->file_name) { in PHP_METHOD()
1012 if (path && ZSTR_LEN(path) && ZSTR_LEN(path) < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
1014 fname = ZSTR_VAL(intern->file_name) + ZSTR_LEN(path) + 1; in PHP_METHOD()
1015 flen = ZSTR_LEN(intern->file_name) - (ZSTR_LEN(path) + 1); in PHP_METHOD()
1017 fname = ZSTR_VAL(intern->file_name); in PHP_METHOD()
1018 flen = ZSTR_LEN(intern->file_name); in PHP_METHOD()
1080 RETURN_STR_COPY(intern->file_name); in PHP_METHOD()
1098 RETURN_STR_COPY(intern->file_name); in PHP_METHOD()
1158 php_stat(intern->file_name, func_num, return_value); \
1234 if (intern->file_name == NULL) { in FileInfoFunction()
1240 if (intern->file_name == NULL) { in FileInfoFunction()
1244 if (!IS_ABSOLUTE_PATH(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->file_name))) { in FileInfoFunction()
1246 …if (!expand_filepath_with_mode(ZSTR_VAL(intern->file_name), expanded_path, NULL, 0, CWD_EXPAND )) { in FileInfoFunction()
1252 ret = php_sys_readlink(ZSTR_VAL(intern->file_name), buff, MAXPATHLEN-1); in FileInfoFunction()
1259 …timeException, 0, "Unable to read link %s, error: %s", ZSTR_VAL(intern->file_name), strerror(errno… in FileInfoFunction()
1281 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in PHP_METHOD()
1290 filename = intern->file_name ? ZSTR_VAL(intern->file_name) : NULL; in PHP_METHOD()
1479 php_stat(intern->file_name, FS_LPERMS, return_value); in PHP_METHOD()
1489 php_stat(intern->file_name, FS_IS_DIR, return_value); in PHP_METHOD()
1511 ZVAL_STR_COPY(&params[0], intern->file_name); in PHP_METHOD()
1695 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1696 zend_string_release(object->file_name); in spl_filesystem_dir_it_move_forward()
1697 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1735 ZVAL_STR_COPY(&iterator->current, object->file_name); in spl_filesystem_tree_it_current_data()
1763 ZVAL_STR_COPY(key, object->file_name); in spl_filesystem_tree_it_current_key()
1779 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1780 zend_string_release(object->file_name); in spl_filesystem_tree_it_move_forward()
1781 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1846 …_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_cannot_read()
2009 …row_exception_ex(spl_ce_RuntimeException, 0, "Cannot rewind file %s", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_rewind()
2025 zend_string *file_name = NULL; in PHP_METHOD() local
2032 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "P|Sbr!", &file_name, &open_mode, &use_include_path, &s… in PHP_METHOD()
2044 intern->file_name = file_name; in PHP_METHOD()
2075 zend_string *file_name; in PHP_METHOD() local
2091 file_name = ZSTR_INIT_LITERAL("php://memory", 0); in PHP_METHOD()
2093 file_name = zend_strpprintf(0, "php://temp/maxmemory:" ZEND_LONG_FMT, max_memory); in PHP_METHOD()
2095 file_name = ZSTR_INIT_LITERAL("php://temp", 0); in PHP_METHOD()
2097 intern->file_name = file_name; in PHP_METHOD()
2105 zend_string_release(file_name); in PHP_METHOD()
2688 …hrow_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", ZSTR_VAL(intern->file_name)); in PHP_METHOD()