Lines Matching refs:file_name

120 	if (intern->file_name) {  in spl_filesystem_object_free_storage()
121 efree(intern->file_name); in spl_filesystem_object_free_storage()
210 if (!intern->file_name) { in spl_filesystem_object_get_file_name()
218 if (intern->file_name) { in spl_filesystem_object_get_file_name()
219 efree(intern->file_name); in spl_filesystem_object_get_file_name()
224 &intern->file_name, 0, "%s", intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
227 &intern->file_name, 0, "%s%c%s", path, slash, intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
291 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp); in spl_filesystem_file_open()
294 intern->file_name = NULL; in spl_filesystem_file_open()
300 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
304 …l_ce_RuntimeException, 0, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
306 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
318 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
324 intern->file_name = estrndup(intern->file_name, intern->file_name_len); in spl_filesystem_file_open()
369 intern->file_name = estrndup(source->file_name, intern->file_name_len); in spl_filesystem_object_clone()
405 if (intern->file_name) { in spl_filesystem_info_set_filename()
406 efree(intern->file_name); in spl_filesystem_info_set_filename()
409 intern->file_name = use_copy ? estrndup(path, len) : path; in spl_filesystem_info_set_filename()
412 while (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_info_set_filename()
413 intern->file_name[intern->file_name_len-1] = 0; in spl_filesystem_info_set_filename()
417 p1 = strrchr(intern->file_name, '/'); in spl_filesystem_info_set_filename()
419 p2 = strrchr(intern->file_name, '\\'); in spl_filesystem_info_set_filename()
424 intern->_path_len = ((p1 > p2 ? p1 : p2) - intern->file_name); in spl_filesystem_info_set_filename()
512 ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
516 intern->file_name = estrndup(source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
536 ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
542 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
555 intern->file_name = NULL; in spl_filesystem_object_create_type()
589 return intern->file_name; in spl_filesystem_object_get_pathname()
594 return intern->file_name; in spl_filesystem_object_get_pathname()
626 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
631 ZVAL_STRINGL(&tmp, intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in spl_filesystem_object_get_debug_info()
633 ZVAL_STRINGL(&tmp, intern->file_name, intern->file_name_len); in spl_filesystem_object_get_debug_info()
830 if (intern->file_name) { in SPL_METHOD()
831 efree(intern->file_name); in SPL_METHOD()
832 intern->file_name = NULL; in SPL_METHOD()
912 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in SPL_METHOD()
914 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
952 fname = intern->file_name + path_len + 1; in SPL_METHOD()
955 fname = intern->file_name; in SPL_METHOD()
1017 fname = intern->file_name + path_len + 1; in SPL_METHOD()
1020 fname = intern->file_name; in SPL_METHOD()
1081 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
1098 RETURN_STRINGL(intern->file_name, intern->file_name_len); in SPL_METHOD()
1159 php_stat(intern->file_name, intern->file_name_len, func_num, return_value); \
1254 if (intern->file_name == NULL) { in FileInfoFunction()
1258 if (intern->file_name == NULL) { in FileInfoFunction()
1261 } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1263 if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND )) { in FileInfoFunction()
1269 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1276 …pl_ce_RuntimeException, 0, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1305 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in SPL_METHOD()
1312 filename = intern->file_name; in SPL_METHOD()
1502 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value); in SPL_METHOD()
1507 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value); in SPL_METHOD()
1528 ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len); in SPL_METHOD()
1713 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1714 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1715 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1759 ZVAL_STRINGL(&iterator->current, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_data()
1783 ZVAL_STRINGL(key, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_key()
1798 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1799 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1800 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1874 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len); in spl_filesystem_object_cast()
1892 ZEND_ARG_INFO(0, file_name)
2028 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read()
2161 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2246 zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2271 &intern->file_name, &intern->file_name_len, in SPL_METHOD()
2275 intern->file_name = NULL; in SPL_METHOD()
2330 intern->file_name = "php://memory"; in SPL_METHOD()
2334 intern->file_name = tmp_fname; in SPL_METHOD()
2336 intern->file_name = "php://temp"; in SPL_METHOD()
2956 zend_throw_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", intern->file_name); in SPL_METHOD()
2979 …icException, 0, "Can't seek file %s to negative line " ZEND_LONG_FMT, intern->file_name, line_pos); in SPL_METHOD()
2994 ZEND_ARG_INFO(0, file_name)