[OS] Add functions to determine standard I/O device type.

This commit is contained in:
bruvzg
2024-04-26 10:34:35 +03:00
parent 87318a2fb7
commit 76164c2aa9
11 changed files with 377 additions and 22 deletions

View File

@ -44,11 +44,16 @@ void Semaphore::_bind_compatibility_methods() {
// OS
String OS::_read_string_from_stdin_bind_compat_91201() {
return read_string_from_stdin(1024);
}
Dictionary OS::_execute_with_pipe_bind_compat_94434(const String &p_path, const Vector<String> &p_arguments) {
return execute_with_pipe(p_path, p_arguments, true);
}
void OS::_bind_compatibility_methods() {
ClassDB::bind_compatibility_method(D_METHOD("read_string_from_stdin"), &OS::_read_string_from_stdin_bind_compat_91201);
ClassDB::bind_compatibility_method(D_METHOD("execute_with_pipe", "path", "arguments"), &OS::_execute_with_pipe_bind_compat_94434);
}