@@ -134,6 +134,10 @@ ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) {
134134 return ::ResourceLoader::get_resource_uid (p_path);
135135}
136136
137+ Vector<String> ResourceLoader::list_directory (const String &p_directory) {
138+ return ::ResourceLoader::list_directory (p_directory);
139+ }
140+
137141void ResourceLoader::_bind_methods () {
138142 ClassDB::bind_method (D_METHOD (" load_threaded_request" , " path" , " type_hint" , " use_sub_threads" , " cache_mode" ), &ResourceLoader::load_threaded_request, DEFVAL (" " ), DEFVAL (false ), DEFVAL (CACHE_MODE_REUSE));
139143 ClassDB::bind_method (D_METHOD (" load_threaded_get_status" , " path" , " progress" ), &ResourceLoader::load_threaded_get_status, DEFVAL_ARRAY);
@@ -149,6 +153,7 @@ void ResourceLoader::_bind_methods() {
149153 ClassDB::bind_method (D_METHOD (" get_cached_ref" , " path" ), &ResourceLoader::get_cached_ref);
150154 ClassDB::bind_method (D_METHOD (" exists" , " path" , " type_hint" ), &ResourceLoader::exists, DEFVAL (" " ));
151155 ClassDB::bind_method (D_METHOD (" get_resource_uid" , " path" ), &ResourceLoader::get_resource_uid);
156+ ClassDB::bind_method (D_METHOD (" list_directory" , " directory_path" ), &ResourceLoader::list_directory);
152157
153158 BIND_ENUM_CONSTANT (THREAD_LOAD_INVALID_RESOURCE);
154159 BIND_ENUM_CONSTANT (THREAD_LOAD_IN_PROGRESS);
@@ -305,8 +310,24 @@ Error OS::shell_show_in_file_manager(const String &p_path, bool p_open_folder) {
305310 return ::OS::get_singleton ()->shell_show_in_file_manager (p_path, p_open_folder);
306311}
307312
308- String OS::read_string_from_stdin () {
309- return ::OS::get_singleton ()->get_stdin_string ();
313+ String OS::read_string_from_stdin (int64_t p_buffer_size) {
314+ return ::OS::get_singleton ()->get_stdin_string (p_buffer_size);
315+ }
316+
317+ PackedByteArray OS::read_buffer_from_stdin (int64_t p_buffer_size) {
318+ return ::OS::get_singleton ()->get_stdin_buffer (p_buffer_size);
319+ }
320+
321+ OS::StdHandleType OS::get_stdin_type () const {
322+ return (OS::StdHandleType)::OS::get_singleton ()->get_stdin_type ();
323+ }
324+
325+ OS::StdHandleType OS::get_stdout_type () const {
326+ return (OS::StdHandleType)::OS::get_singleton ()->get_stdout_type ();
327+ }
328+
329+ OS::StdHandleType OS::get_stderr_type () const {
330+ return (OS::StdHandleType)::OS::get_singleton ()->get_stderr_type ();
310331}
311332
312333int OS::execute (const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr, bool p_open_console) {
@@ -630,7 +651,13 @@ void OS::_bind_methods() {
630651 ClassDB::bind_method (D_METHOD (" get_system_font_path" , " font_name" , " weight" , " stretch" , " italic" ), &OS::get_system_font_path, DEFVAL (400 ), DEFVAL (100 ), DEFVAL (false ));
631652 ClassDB::bind_method (D_METHOD (" get_system_font_path_for_text" , " font_name" , " text" , " locale" , " script" , " weight" , " stretch" , " italic" ), &OS::get_system_font_path_for_text, DEFVAL (String ()), DEFVAL (String ()), DEFVAL (400 ), DEFVAL (100 ), DEFVAL (false ));
632653 ClassDB::bind_method (D_METHOD (" get_executable_path" ), &OS::get_executable_path);
633- ClassDB::bind_method (D_METHOD (" read_string_from_stdin" ), &OS::read_string_from_stdin);
654+
655+ ClassDB::bind_method (D_METHOD (" read_string_from_stdin" , " buffer_size" ), &OS::read_string_from_stdin);
656+ ClassDB::bind_method (D_METHOD (" read_buffer_from_stdin" , " buffer_size" ), &OS::read_buffer_from_stdin);
657+ ClassDB::bind_method (D_METHOD (" get_stdin_type" ), &OS::get_stdin_type);
658+ ClassDB::bind_method (D_METHOD (" get_stdout_type" ), &OS::get_stdout_type);
659+ ClassDB::bind_method (D_METHOD (" get_stderr_type" ), &OS::get_stderr_type);
660+
634661 ClassDB::bind_method (D_METHOD (" execute" , " path" , " arguments" , " output" , " read_stderr" , " open_console" ), &OS::execute, DEFVAL_ARRAY, DEFVAL (false ), DEFVAL (false ));
635662 ClassDB::bind_method (D_METHOD (" execute_with_pipe" , " path" , " arguments" , " blocking" ), &OS::execute_with_pipe, DEFVAL (true ));
636663 ClassDB::bind_method (D_METHOD (" create_process" , " path" , " arguments" , " open_console" ), &OS::create_process, DEFVAL (false ));
@@ -722,6 +749,12 @@ void OS::_bind_methods() {
722749 BIND_ENUM_CONSTANT (SYSTEM_DIR_MUSIC);
723750 BIND_ENUM_CONSTANT (SYSTEM_DIR_PICTURES);
724751 BIND_ENUM_CONSTANT (SYSTEM_DIR_RINGTONES);
752+
753+ BIND_ENUM_CONSTANT (STD_HANDLE_INVALID);
754+ BIND_ENUM_CONSTANT (STD_HANDLE_CONSOLE);
755+ BIND_ENUM_CONSTANT (STD_HANDLE_FILE);
756+ BIND_ENUM_CONSTANT (STD_HANDLE_PIPE);
757+ BIND_ENUM_CONSTANT (STD_HANDLE_UNKNOWN);
725758}
726759
727760// //// Geometry2D //////
0 commit comments