Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
FileSystemDock¶
继承: VBoxContainer < BoxContainer < Container < Control < CanvasItem < Node < Object
Godot 编辑器中用于管理项目文件的停靠面板。
描述¶
这个类仅在 EditorPlugin 中可用,无法实例化。可以使用 EditorInterface.get_file_system_dock 访问。
虽然 FileSystemDock 没有暴露任何操作文件的方法,但是你可以监听各种与文件相关的信号。
方法¶
void |
add_resource_tooltip_plugin ( EditorResourceTooltipPlugin plugin ) |
void |
navigate_to_path ( String path ) |
void |
remove_resource_tooltip_plugin ( EditorResourceTooltipPlugin plugin ) |
信号¶
display_mode_changed ( )
用户切换文件显示模式或分隔模式时发出。
file_removed ( String file )
给定的文件 file
被移除时发出。
files_moved ( String old_file, String new_file )
文件从 old_file
路径移动到 new_file
路径时发出。
folder_moved ( String old_folder, String new_folder )
文件夹从 old_folder
路径移动到 new_folder
路径时发出。
folder_removed ( String folder )
给定的文件夹 folder
被移除时发出。
inherit ( String file )
创建新场景,且该场景继承自位于 file
路径的场景时发出。
instantiate ( PackedStringArray files )
在编辑器中实例化给定场景时发出。
resource_removed ( Resource resource )
外部资源 resource
的对应文件被移除时发出。
方法说明¶
void add_resource_tooltip_plugin ( EditorResourceTooltipPlugin plugin )
注册一个新的 EditorResourceTooltipPlugin。
将给定的 path
设置为当前选定的路径,能够确保选中的文件/目录可见。
void remove_resource_tooltip_plugin ( EditorResourceTooltipPlugin plugin )
移除一个 EditorResourceTooltipPlugin。如果该插件尚未添加,则失败。