Lines Matching refs:file_name
126 if (intern->file_name) { in spl_filesystem_object_free_storage()
127 zend_string_release(intern->file_name); in spl_filesystem_object_free_storage()
214 if (intern->file_name) { in spl_filesystem_object_get_file_name()
236 intern->file_name = zend_string_init(intern->u.dir.entry.d_name, name_len, 0); in spl_filesystem_object_get_file_name()
238 zend_string *file_name = zend_string_alloc(path_len + 1 + name_len, 0); in spl_filesystem_object_get_file_name() local
239 memcpy(ZSTR_VAL(file_name), path, path_len); in spl_filesystem_object_get_file_name()
240 ZSTR_VAL(file_name)[path_len] = slash; in spl_filesystem_object_get_file_name() local
241 memcpy(ZSTR_VAL(file_name) + path_len + 1, intern->u.dir.entry.d_name, name_len); in spl_filesystem_object_get_file_name()
242 ZSTR_VAL(file_name)[path_len + 1 + name_len] = 0; in spl_filesystem_object_get_file_name() local
243 intern->file_name = file_name; in spl_filesystem_object_get_file_name()
253 if (intern->file_name) { in spl_filesystem_dir_read()
255 zend_string_release(intern->file_name); in spl_filesystem_dir_read()
256 intern->file_name = NULL; in spl_filesystem_dir_read()
314 php_stat(intern->file_name, FS_IS_DIR, &tmp); in spl_filesystem_file_open()
318 intern->file_name = NULL; in spl_filesystem_file_open()
324 …intern->u.file.stream = php_stream_open_wrapper_ex(ZSTR_VAL(intern->file_name), ZSTR_VAL(intern->u… in spl_filesystem_file_open()
326 if (!ZSTR_LEN(intern->file_name) || !intern->u.file.stream) { in spl_filesystem_file_open()
328 …row_exception_ex(spl_ce_RuntimeException, 0, "Cannot open file '%s'", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_open()
332 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
343 …if (ZSTR_LEN(intern->file_name) > 1 && IS_SLASH_AT(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->f… in spl_filesystem_file_open()
344 …intern->file_name = zend_string_init(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->file_name)-1, 0… in spl_filesystem_file_open()
346 intern->file_name = zend_string_copy(intern->file_name); in spl_filesystem_file_open()
391 if (source->file_name != NULL) { in spl_filesystem_object_clone()
392 intern->file_name = zend_string_copy(source->file_name); in spl_filesystem_object_clone()
429 if (intern->file_name) { in spl_filesystem_info_set_filename()
430 zend_string_release(intern->file_name); in spl_filesystem_info_set_filename()
438 intern->file_name = zend_string_init(ZSTR_VAL(path), path_len, 0); in spl_filesystem_info_set_filename()
440 intern->file_name = zend_string_copy(path); in spl_filesystem_info_set_filename()
513 ZVAL_STR_COPY(&arg1, source->file_name); in spl_filesystem_object_create_type()
520 intern->file_name = zend_string_copy(source->file_name); in spl_filesystem_object_create_type()
550 ZVAL_STR_COPY(&arg1, source->file_name); in spl_filesystem_object_create_type()
559 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
599 return intern->file_name; in spl_filesystem_object_get_pathname()
603 return intern->file_name; in spl_filesystem_object_get_pathname()
635 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
641 if (path_len && path_len < ZSTR_LEN(intern->file_name)) { in spl_filesystem_object_get_debug_info()
642 …ZVAL_STRINGL(&tmp, ZSTR_VAL(intern->file_name) + path_len + 1, ZSTR_LEN(intern->file_name) - (path… in spl_filesystem_object_get_debug_info()
644 ZVAL_STR_COPY(&tmp, intern->file_name); in spl_filesystem_object_get_debug_info()
831 if (intern->file_name) { in PHP_METHOD()
832 zend_string_release(intern->file_name); in PHP_METHOD()
833 intern->file_name = NULL; in PHP_METHOD()
912 if (!intern->file_name) { in PHP_METHOD()
919 if (path_len && path_len < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
920 …RETURN_STRINGL(ZSTR_VAL(intern->file_name) + path_len + 1, ZSTR_LEN(intern->file_name) - (path_len… in PHP_METHOD()
922 RETURN_STR_COPY(intern->file_name); in PHP_METHOD()
956 if (!intern->file_name) { in PHP_METHOD()
963 if (path_len && path_len < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
964 fname = ZSTR_VAL(intern->file_name) + path_len + 1; in PHP_METHOD()
965 flen = ZSTR_LEN(intern->file_name) - (path_len + 1); in PHP_METHOD()
967 fname = ZSTR_VAL(intern->file_name); in PHP_METHOD()
968 flen = ZSTR_LEN(intern->file_name); in PHP_METHOD()
1025 if (!intern->file_name) { in PHP_METHOD()
1032 if (path_len && path_len < ZSTR_LEN(intern->file_name)) { in PHP_METHOD()
1033 fname = ZSTR_VAL(intern->file_name) + path_len + 1; in PHP_METHOD()
1034 flen = ZSTR_LEN(intern->file_name) - (path_len + 1); in PHP_METHOD()
1036 fname = ZSTR_VAL(intern->file_name); in PHP_METHOD()
1037 flen = ZSTR_LEN(intern->file_name); in PHP_METHOD()
1096 RETURN_STR_COPY(intern->file_name); in PHP_METHOD()
1114 RETURN_STR_COPY(intern->file_name); in PHP_METHOD()
1174 php_stat(intern->file_name, func_num, return_value); \
1250 if (intern->file_name == NULL) { in FileInfoFunction()
1256 if (intern->file_name == NULL) { in FileInfoFunction()
1260 if (!IS_ABSOLUTE_PATH(ZSTR_VAL(intern->file_name), ZSTR_LEN(intern->file_name))) { in FileInfoFunction()
1262 …if (!expand_filepath_with_mode(ZSTR_VAL(intern->file_name), expanded_path, NULL, 0, CWD_EXPAND )) { in FileInfoFunction()
1268 ret = php_sys_readlink(ZSTR_VAL(intern->file_name), buff, MAXPATHLEN-1); in FileInfoFunction()
1275 …timeException, 0, "Unable to read link %s, error: %s", ZSTR_VAL(intern->file_name), strerror(errno… in FileInfoFunction()
1297 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in PHP_METHOD()
1306 filename = intern->file_name ? ZSTR_VAL(intern->file_name) : NULL; in PHP_METHOD()
1482 php_stat(intern->file_name, FS_LPERMS, return_value); in PHP_METHOD()
1492 php_stat(intern->file_name, FS_IS_DIR, return_value); in PHP_METHOD()
1515 ZVAL_STR_COPY(&zpath, intern->file_name); in PHP_METHOD()
1694 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1695 zend_string_release(object->file_name); in spl_filesystem_dir_it_move_forward()
1696 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1734 ZVAL_STR_COPY(&iterator->current, object->file_name); in spl_filesystem_tree_it_current_data()
1762 ZVAL_STR_COPY(key, object->file_name); in spl_filesystem_tree_it_current_key()
1777 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1778 zend_string_release(object->file_name); in spl_filesystem_tree_it_move_forward()
1779 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1850 …_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_read_ex()
1934 …_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_read_line_ex()
2015 …row_exception_ex(spl_ce_RuntimeException, 0, "Cannot rewind file %s", ZSTR_VAL(intern->file_name)); in spl_filesystem_file_rewind()
2037 &intern->file_name, &open_mode, in PHP_METHOD()
2040 intern->file_name = NULL; in PHP_METHOD()
2074 zend_string *file_name; in PHP_METHOD() local
2084 file_name = zend_string_init("php://memory", sizeof("php://memory")-1, 0); in PHP_METHOD()
2086 file_name = zend_strpprintf(0, "php://temp/maxmemory:" ZEND_LONG_FMT, max_memory); in PHP_METHOD()
2088 file_name = zend_string_init("php://temp", sizeof("php://temp")-1, 0); in PHP_METHOD()
2090 intern->file_name = file_name; in PHP_METHOD()
2098 zend_string_release(file_name); in PHP_METHOD()
2682 …hrow_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", ZSTR_VAL(intern->file_name)); in PHP_METHOD()