engage/generated/system/io/
directoryinfo.rs1#[cfg(feature = "system-io-directoryinfo-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::{
9 io::filesysteminfo::{FileSystemInfo, IFileSystemInfo},
10 object::{IObject, Object},
11 };
12
13 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/directoryinfo/DirectoryInfo.md"))]
14 #[::unity::class(namespace = "System.IO", name = "DirectoryInfo")]
15 #[parent(crate::system::io::filesysteminfo::FileSystemInfo)]
16 pub struct DirectoryInfo {
17 #[offset(96)]
18 #[rename(name = "current")]
19 pub current: ::unity::Il2CppString,
20 #[offset(104)]
21 #[rename(name = "parent")]
22 pub parent: ::unity::Il2CppString,
23 }
24}
25
26#[cfg(feature = "system-io-directoryinfo-types")]
27pub use __types::*;
28
29#[cfg(feature = "system-io-directoryinfo")]
30pub trait IDirectoryInfoMethods: IDirectoryInfo {
31 #[doc = "`.ctor(::unity::Il2CppString)` overload"]
32 fn ctor(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
33 unsafe {
34 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
35 ::unity::il2cpp_call!((::unity::module_base()+0x363dc20usize)as*mut u8,();
36(DirectoryInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path))
37 }
38 }
39 #[doc = "`.ctor(::unity::Il2CppString, bool)` overload"]
40 fn ctor_2(self, path: impl ::core::convert::Into<::unity::Il2CppString>, simple_original_path: impl ::core::convert::Into<bool>) -> () {
41 unsafe {
42 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
43 ::unity::il2cpp_call!((::unity::module_base()+0x363d160usize)as*mut u8,();
44(DirectoryInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path),(bool)::core::convert::Into::into(simple_original_path))
45 }
46 }
47 #[doc = "`Initialize()` overload"]
48 fn initialize(self) -> () {
49 unsafe {
50 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
51 ::unity::il2cpp_call!((::unity::module_base()+0x363dda0usize)as*mut u8,();
52(DirectoryInfo)__receiver)
53 }
54 }
55 #[doc = "`get_Exists()` overload"]
56 fn get_exists(self) -> bool {
57 unsafe {
58 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
59 {
60 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
61 let __vi = *__vt.get(9usize).unwrap_or_else(|| {
62 panic!(
63 "unity: virtual slot {}
64 out of range (vtable len {}
65) on the runtime class behind {}
66 (method `{}
67`)",
68 9usize,
69 __vt.len(),
70 <DirectoryInfo as ::unity::ClassIdentity>::NAME,
71 "get_Exists",
72 )
73 });
74 let __inner: extern "C" fn(DirectoryInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
75 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
76 __inner(__receiver, __mi)
77 }
78 }
79 }
80 #[doc = "`get_Name()` overload"]
81 fn get_name(self) -> ::unity::Il2CppString {
82 unsafe {
83 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
84 {
85 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
86 let __vi = *__vt.get(8usize).unwrap_or_else(|| {
87 panic!(
88 "unity: virtual slot {}
89 out of range (vtable len {}
90) on the runtime class behind {}
91 (method `{}
92`)",
93 8usize,
94 __vt.len(),
95 <DirectoryInfo as ::unity::ClassIdentity>::NAME,
96 "get_Name",
97 )
98 });
99 let __inner: extern "C" fn(DirectoryInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
100 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
101 __inner(__receiver, __mi)
102 }
103 }
104 }
105 #[doc = "`get_Parent()` overload"]
106 fn get_parent(self) -> crate::system::io::directoryinfo::DirectoryInfo {
107 unsafe {
108 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
109 ::unity::il2cpp_call!((::unity::module_base()+0x363d260usize)as*mut u8,crate::system::io::directoryinfo::DirectoryInfo;
110(DirectoryInfo)__receiver)
111 }
112 }
113 #[doc = "`Create()` overload"]
114 fn create(self) -> () {
115 unsafe {
116 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
117 ::unity::il2cpp_call!((::unity::module_base()+0x363d2e0usize)as*mut u8,();
118(DirectoryInfo)__receiver)
119 }
120 }
121 #[doc = "`GetFiles()` overload"]
122 fn get_files(self) -> ::unity::Array<crate::system::io::fileinfo::FileInfo> {
123 unsafe {
124 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
125 ::unity::il2cpp_call!((::unity::module_base()+0x363e0d0usize)as*mut u8, ::unity::Array<crate::system::io::fileinfo::FileInfo> ;
126(DirectoryInfo)__receiver)
127 }
128 }
129 #[doc = "`GetFiles(::unity::Il2CppString)` overload"]
130 fn get_files_2(self, search_pattern: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Array<crate::system::io::fileinfo::FileInfo> {
131 unsafe {
132 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
133 ::unity::il2cpp_call!((::unity::module_base()+0x363e130usize)as*mut u8, ::unity::Array<crate::system::io::fileinfo::FileInfo> ;
134(DirectoryInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(search_pattern))
135 }
136 }
137 #[doc = "`GetDirectories()` overload"]
138 fn get_directories(self) -> ::unity::Array<crate::system::io::directoryinfo::DirectoryInfo> {
139 unsafe {
140 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
141 ::unity::il2cpp_call!((::unity::module_base()+0x363e2d0usize)as*mut u8, ::unity::Array<crate::system::io::directoryinfo::DirectoryInfo> ;
142(DirectoryInfo)__receiver)
143 }
144 }
145 #[doc = "`GetDirectories(::unity::Il2CppString)` overload"]
146 fn get_directories_2(
147 self,
148 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
149 ) -> ::unity::Array<crate::system::io::directoryinfo::DirectoryInfo> {
150 unsafe {
151 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
152 ::unity::il2cpp_call!((::unity::module_base()+0x363e330usize)as*mut u8, ::unity::Array<crate::system::io::directoryinfo::DirectoryInfo> ;
153(DirectoryInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(search_pattern))
154 }
155 }
156 #[doc = "`ToString()` overload"]
157 fn to_string(self) -> ::unity::Il2CppString {
158 unsafe {
159 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
160 {
161 let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
162 let __vi = *__vt.get(3usize).unwrap_or_else(|| {
163 panic!(
164 "unity: virtual slot {}
165 out of range (vtable len {}
166) on the runtime class behind {}
167 (method `{}
168`)",
169 3usize,
170 __vt.len(),
171 <DirectoryInfo as ::unity::ClassIdentity>::NAME,
172 "ToString",
173 )
174 });
175 let __inner: extern "C" fn(DirectoryInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
176 let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
177 __inner(__receiver, __mi)
178 }
179 }
180 }
181 #[doc = "`CheckPath(::unity::Il2CppString)` overload"]
182 fn check_path(self, path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
183 unsafe {
184 let __receiver = <DirectoryInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
185 ::unity::il2cpp_call!((::unity::module_base()+0x363dc30usize)as*mut u8,();
186(DirectoryInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(path))
187 }
188 }
189}
190
191#[cfg(feature = "system-io-directoryinfo")]
192impl<__T: IDirectoryInfo> IDirectoryInfoMethods for __T {}
193
194#[cfg(feature = "system-io-directoryinfo")]
195impl DirectoryInfo {
196 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
197 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
198 }
199
200 pub fn ctor_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
201 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
202 }
203
204 pub fn initialize_method_info() -> &'static ::unity::il2cpp::MethodInfo {
205 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
206 }
207
208 pub fn get_exists_method_info() -> &'static ::unity::il2cpp::MethodInfo {
209 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
210 }
211
212 pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
213 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
214 }
215
216 pub fn get_parent_method_info() -> &'static ::unity::il2cpp::MethodInfo {
217 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
218 }
219
220 pub fn create_method_info() -> &'static ::unity::il2cpp::MethodInfo {
221 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
222 }
223
224 pub fn get_files_method_info() -> &'static ::unity::il2cpp::MethodInfo {
225 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
226 }
227
228 pub fn get_files_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
229 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
230 }
231
232 pub fn get_directories_method_info() -> &'static ::unity::il2cpp::MethodInfo {
233 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
234 }
235
236 pub fn get_directories_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
237 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
238 }
239
240 pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
241 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
242 }
243
244 pub fn check_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
245 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
246 }
247}
248
249#[cfg(feature = "system-io-directoryinfo")]
250impl DirectoryInfo {
251 #[doc = "Direct (non-virtual) call to `DirectoryInfo`'s own `get_Exists`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
252 pub unsafe fn get_exists(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
253 let __mi = Self::get_exists_method_info();
254 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
255 __inner(this.into(), ::core::option::Option::None)
256 }
257
258 #[doc = "Direct (non-virtual) call to `DirectoryInfo`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
259 pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
260 let __mi = Self::get_name_method_info();
261 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
262 __inner(this.into(), ::core::option::Option::None)
263 }
264
265 #[doc = "Direct (non-virtual) call to `DirectoryInfo`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
266 pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
267 let __mi = Self::to_string_method_info();
268 let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
269 __inner(this.into(), ::core::option::Option::None)
270 }
271}
272
273#[cfg(feature = "system-io-directoryinfo")]
274impl DirectoryInfo {
275 #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
276 pub fn new(path: ::unity::Il2CppString) -> Self {
277 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
278 panic!(
279 "{}
280::{}
281 failed to instantiate",
282 ::core::stringify!(DirectoryInfo),
283 ::core::stringify!(new),
284 )
285 });
286 <Self as IDirectoryInfoMethods>::ctor(this, path);
287 this
288 }
289
290 #[doc = "`.ctor(::unity::Il2CppString, bool)` — overload selector"]
291 pub fn new_2(path: ::unity::Il2CppString, simple_original_path: bool) -> Self {
292 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
293 panic!(
294 "{}
295::{}
296 failed to instantiate",
297 ::core::stringify!(DirectoryInfo),
298 ::core::stringify!(new_2),
299 )
300 });
301 <Self as IDirectoryInfoMethods>::ctor_2(this, path, simple_original_path);
302 this
303 }
304}
305
306#[cfg(feature = "system-io-directoryinfo")]
307#[doc(hidden)]
308pub mod prelude {
309 pub use super::{DirectoryInfo, IDirectoryInfo, IDirectoryInfoMethods};
310 #[cfg(feature = "system-io-filesysteminfo")]
311 pub use crate::system::io::filesysteminfo::IFileSystemInfoMethods;
312 #[cfg(feature = "system-object")]
313 pub use crate::system::object::IObjectMethods;
314 pub use crate::system::{io::filesysteminfo::IFileSystemInfo, object::IObject};
315}