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()
219 if (intern->file_name) { in spl_filesystem_object_get_file_name()
220 efree(intern->file_name); in spl_filesystem_object_get_file_name()
225 &intern->file_name, 0, "%s", intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
228 &intern->file_name, 0, "%s%c%s", path, slash, intern->u.dir.entry.d_name); in spl_filesystem_object_get_file_name()
293 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, &tmp); in spl_filesystem_file_open()
296 intern->file_name = NULL; in spl_filesystem_file_open()
302 …intern->u.file.stream = php_stream_open_wrapper_ex(intern->file_name, intern->u.file.open_mode, (u… in spl_filesystem_file_open()
306 …l_ce_RuntimeException, 0, "Cannot open file '%s'", intern->file_name_len ? intern->file_name : ""); in spl_filesystem_file_open()
308 intern->file_name = NULL; /* until here it is not a copy */ in spl_filesystem_file_open()
320 if (intern->file_name_len > 1 && IS_SLASH_AT(intern->file_name, intern->file_name_len-1)) { in spl_filesystem_file_open()
326 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()
548 ZVAL_STRINGL(&arg1, source->file_name, source->file_name_len); in spl_filesystem_object_create_type()
554 intern->file_name = source->file_name; in spl_filesystem_object_create_type()
592 return intern->file_name; in spl_filesystem_object_get_pathname()
597 return intern->file_name; in spl_filesystem_object_get_pathname()
627 if (intern->file_name) { in spl_filesystem_object_get_debug_info()
632 ZVAL_STRINGL(&tmp, intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in spl_filesystem_object_get_debug_info()
634 ZVAL_STRINGL(&tmp, intern->file_name, intern->file_name_len); in spl_filesystem_object_get_debug_info()
823 if (intern->file_name) { in PHP_METHOD()
824 efree(intern->file_name); in PHP_METHOD()
825 intern->file_name = NULL; in PHP_METHOD()
902 if (!intern->file_name) { in PHP_METHOD()
910 RETURN_STRINGL(intern->file_name + path_len + 1, intern->file_name_len - (path_len + 1)); in PHP_METHOD()
912 RETURN_STRINGL(intern->file_name, intern->file_name_len); in PHP_METHOD()
945 if (!intern->file_name) { in PHP_METHOD()
953 fname = intern->file_name + path_len + 1; in PHP_METHOD()
956 fname = intern->file_name; in PHP_METHOD()
1013 if (!intern->file_name) { in PHP_METHOD()
1021 fname = intern->file_name + path_len + 1; in PHP_METHOD()
1024 fname = intern->file_name; in PHP_METHOD()
1084 RETURN_STRINGL(intern->file_name, intern->file_name_len); in PHP_METHOD()
1102 RETURN_STRINGL(intern->file_name, intern->file_name_len); in PHP_METHOD()
1162 php_stat(intern->file_name, intern->file_name_len, func_num, return_value); \
1241 if (intern->file_name == NULL) { in FileInfoFunction()
1248 if (intern->file_name == NULL) { in FileInfoFunction()
1252 if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { in FileInfoFunction()
1254 if (!expand_filepath_with_mode(intern->file_name, expanded_path, NULL, 0, CWD_EXPAND )) { in FileInfoFunction()
1261 ret = php_sys_readlink(intern->file_name, buff, MAXPATHLEN-1); in FileInfoFunction()
1268 …pl_ce_RuntimeException, 0, "Unable to read link %s, error: %s", intern->file_name, strerror(errno)… in FileInfoFunction()
1295 if (intern->type == SPL_FS_DIR && !intern->file_name && intern->u.dir.entry.d_name[0]) { in PHP_METHOD()
1305 filename = intern->file_name; in PHP_METHOD()
1483 php_stat(intern->file_name, intern->file_name_len, FS_IS_LINK, return_value); in PHP_METHOD()
1488 php_stat(intern->file_name, intern->file_name_len, FS_IS_DIR, return_value); in PHP_METHOD()
1510 ZVAL_STRINGL(&zpath, intern->file_name, intern->file_name_len); in PHP_METHOD()
1684 if (object->file_name) { in spl_filesystem_dir_it_move_forward()
1685 efree(object->file_name); in spl_filesystem_dir_it_move_forward()
1686 object->file_name = NULL; in spl_filesystem_dir_it_move_forward()
1724 ZVAL_STRINGL(&iterator->current, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_data()
1752 ZVAL_STRINGL(key, object->file_name, object->file_name_len); in spl_filesystem_tree_it_current_key()
1767 if (object->file_name) { in spl_filesystem_tree_it_move_forward()
1768 efree(object->file_name); in spl_filesystem_tree_it_move_forward()
1769 object->file_name = NULL; in spl_filesystem_tree_it_move_forward()
1844 ZVAL_STRINGL(writeobj, intern->file_name, intern->file_name_len); in spl_filesystem_object_cast()
1868 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_ex()
1955 …zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot read from file %s", intern->file_name); in spl_filesystem_file_read_line_ex()
2035 zend_throw_exception_ex(spl_ce_RuntimeException, 0, "Cannot rewind file %s", intern->file_name); in spl_filesystem_file_rewind()
2059 &intern->file_name, &intern->file_name_len, in PHP_METHOD()
2063 intern->file_name = NULL; in PHP_METHOD()
2117 intern->file_name = "php://memory"; in PHP_METHOD()
2121 intern->file_name = tmp_fname; in PHP_METHOD()
2123 intern->file_name = "php://temp"; in PHP_METHOD()
2714 zend_throw_exception_ex(spl_ce_LogicException, 0, "Can't truncate file %s", intern->file_name); in PHP_METHOD()