Skip to main content

engage/generated/system/io/
fileinfo.rs

1// @generated by il2cpp-bindgen — do not edit by hand.
2
3#[cfg(feature = "system-io-fileinfo-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/fileinfo/FileInfo.md"))]
14    #[::unity::class(namespace = "System.IO", name = "FileInfo")]
15    #[parent(crate::system::io::filesysteminfo::FileSystemInfo)]
16    pub struct FileInfo {
17        #[offset(96)]
18        #[rename(name = "_name")]
19        pub name: ::unity::Il2CppString,
20    }
21}
22
23#[cfg(feature = "system-io-fileinfo-types")]
24pub use __types::*;
25
26#[cfg(feature = "system-io-fileinfo")]
27pub trait IFileInfoMethods: IFileInfo {
28    #[doc = "`.ctor(::unity::Il2CppString)` overload"]
29    fn ctor(self, file_name: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
30        unsafe {
31            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
32            ::unity::il2cpp_call!((::unity::module_base()+0x380c780usize)as*mut u8,();
33(FileInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(file_name))
34        }
35    }
36    #[doc = "`Init(::unity::Il2CppString, bool)` overload"]
37    fn init(self, file_name: impl ::core::convert::Into<::unity::Il2CppString>, check_host: impl ::core::convert::Into<bool>) -> () {
38        unsafe {
39            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
40            ::unity::il2cpp_call!((::unity::module_base()+0x380c8c0usize)as*mut u8,();
41(FileInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(file_name),(bool)::core::convert::Into::into(check_host))
42        }
43    }
44    #[doc = "`GetDisplayPath(::unity::Il2CppString)` overload"]
45    fn get_display_path(self, original_path: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Il2CppString {
46        unsafe {
47            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
48            ::unity::il2cpp_call!((::unity::module_base()+0x380c980usize)as*mut u8, ::unity::Il2CppString;
49(FileInfo)__receiver,(::unity::Il2CppString)::core::convert::Into::into(original_path))
50        }
51    }
52    #[doc = "`get_Name()` overload"]
53    fn get_name(self) -> ::unity::Il2CppString {
54        unsafe {
55            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
56            {
57                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
58                let __vi = *__vt.get(8usize).unwrap_or_else(|| {
59                    panic!(
60                        "unity: virtual slot {}
61 out of range (vtable len {}
62) on the runtime class behind {}
63 (method `{}
64`)",
65                        8usize,
66                        __vt.len(),
67                        <FileInfo as ::unity::ClassIdentity>::NAME,
68                        "get_Name",
69                    )
70                });
71                let __inner: extern "C" fn(FileInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
72                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
73                __inner(__receiver, __mi)
74            }
75        }
76    }
77    #[doc = "`get_DirectoryName()` overload"]
78    fn get_directory_name(self) -> ::unity::Il2CppString {
79        unsafe {
80            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
81            ::unity::il2cpp_call!((::unity::module_base()+0x380cbb0usize)as*mut u8, ::unity::Il2CppString;
82(FileInfo)__receiver)
83        }
84    }
85    #[doc = "`get_Directory()` overload"]
86    fn get_directory(self) -> crate::system::io::directoryinfo::DirectoryInfo {
87        unsafe {
88            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
89            ::unity::il2cpp_call!((::unity::module_base()+0x380cc20usize)as*mut u8,crate::system::io::directoryinfo::DirectoryInfo;
90(FileInfo)__receiver)
91        }
92    }
93    #[doc = "`get_Exists()` overload"]
94    fn get_exists(self) -> bool {
95        unsafe {
96            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
97            {
98                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
99                let __vi = *__vt.get(9usize).unwrap_or_else(|| {
100                    panic!(
101                        "unity: virtual slot {}
102 out of range (vtable len {}
103) on the runtime class behind {}
104 (method `{}
105`)",
106                        9usize,
107                        __vt.len(),
108                        <FileInfo as ::unity::ClassIdentity>::NAME,
109                        "get_Exists",
110                    )
111                });
112                let __inner: extern "C" fn(FileInfo, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__vi.method_ptr);
113                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
114                __inner(__receiver, __mi)
115            }
116        }
117    }
118    #[doc = "`ToString()` overload"]
119    fn to_string(self) -> ::unity::Il2CppString {
120        unsafe {
121            let __receiver = <FileInfo as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
122            {
123                let __vt = ::unity::Cast::get_class(__receiver).raw().get_vtable();
124                let __vi = *__vt.get(3usize).unwrap_or_else(|| {
125                    panic!(
126                        "unity: virtual slot {}
127 out of range (vtable len {}
128) on the runtime class behind {}
129 (method `{}
130`)",
131                        3usize,
132                        __vt.len(),
133                        <FileInfo as ::unity::ClassIdentity>::NAME,
134                        "ToString",
135                    )
136                });
137                let __inner: extern "C" fn(FileInfo, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__vi.method_ptr);
138                let __mi: ::unity::OptionalMethod = ::core::option::Option::Some(&*(__vi.method_info as *const ::unity::MethodInfo as *const ()));
139                __inner(__receiver, __mi)
140            }
141        }
142    }
143}
144
145#[cfg(feature = "system-io-fileinfo")]
146impl<__T: IFileInfo> IFileInfoMethods for __T {}
147
148#[cfg(feature = "system-io-fileinfo")]
149impl FileInfo {
150    pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
151        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
152    }
153
154    pub fn init_method_info() -> &'static ::unity::il2cpp::MethodInfo {
155        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
156    }
157
158    pub fn get_display_path_method_info() -> &'static ::unity::il2cpp::MethodInfo {
159        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
160    }
161
162    pub fn get_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
163        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
164    }
165
166    pub fn get_directory_name_method_info() -> &'static ::unity::il2cpp::MethodInfo {
167        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
168    }
169
170    pub fn get_directory_method_info() -> &'static ::unity::il2cpp::MethodInfo {
171        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
172    }
173
174    pub fn get_exists_method_info() -> &'static ::unity::il2cpp::MethodInfo {
175        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
176    }
177
178    pub fn to_string_method_info() -> &'static ::unity::il2cpp::MethodInfo {
179        <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
180    }
181}
182
183#[cfg(feature = "system-io-fileinfo")]
184impl FileInfo {
185    #[doc = "Direct (non-virtual) call to `FileInfo`'s own `get_Name`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
186    pub unsafe fn get_name(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
187        let __mi = Self::get_name_method_info();
188        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
189        __inner(this.into(), ::core::option::Option::None)
190    }
191
192    #[doc = "Direct (non-virtual) call to `FileInfo`'s own `get_Exists`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
193    pub unsafe fn get_exists(this: impl ::core::convert::Into<::unity::IlInstance>) -> bool {
194        let __mi = Self::get_exists_method_info();
195        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> bool = ::core::mem::transmute(__mi.method_ptr);
196        __inner(this.into(), ::core::option::Option::None)
197    }
198
199    #[doc = "Direct (non-virtual) call to `FileInfo`'s own `ToString`. Bypasses the vtable, so it won't hit an override/patch — use it for base calls."]
200    pub unsafe fn to_string(this: impl ::core::convert::Into<::unity::IlInstance>) -> ::unity::Il2CppString {
201        let __mi = Self::to_string_method_info();
202        let __inner: extern "C" fn(::unity::IlInstance, ::unity::OptionalMethod) -> ::unity::Il2CppString = ::core::mem::transmute(__mi.method_ptr);
203        __inner(this.into(), ::core::option::Option::None)
204    }
205}
206
207#[cfg(feature = "system-io-fileinfo")]
208impl FileInfo {
209    #[doc = "`.ctor(::unity::Il2CppString)` — overload selector"]
210    pub fn new(file_name: ::unity::Il2CppString) -> Self {
211        let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
212            panic!(
213                "{}
214::{}
215 failed to instantiate",
216                ::core::stringify!(FileInfo),
217                ::core::stringify!(new),
218            )
219        });
220        <Self as IFileInfoMethods>::ctor(this, file_name);
221        this
222    }
223}
224
225#[cfg(feature = "system-io-fileinfo")]
226#[doc(hidden)]
227pub mod prelude {
228    pub use super::{FileInfo, IFileInfo, IFileInfoMethods};
229    #[cfg(feature = "system-io-filesysteminfo")]
230    pub use crate::system::io::filesysteminfo::IFileSystemInfoMethods;
231    #[cfg(feature = "system-object")]
232    pub use crate::system::object::IObjectMethods;
233    pub use crate::system::{io::filesysteminfo::IFileSystemInfo, object::IObject};
234}