engage/generated/system/io/
directory.rs1#[cfg(feature = "system-io-directory-types")]
4mod __types {
5 #[allow(unused_imports)] use ::unity::prelude::*;
6
7 use super::*;
8 use crate::system::object::{IObject, Object};
9
10 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/directory/Directory.md"))]
11 #[::unity::class(namespace = "System.IO", name = "Directory")]
12 #[parent(crate::system::object::Object)]
13 pub struct Directory {}
14
15 #[doc=include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/","docs/system/io/directory/Directory_SearchData.md"))]
16 #[::unity::class(namespace = "System.IO", name = "Directory.SearchData")]
17 #[parent(crate::system::object::Object)]
18 pub struct Directory_SearchData {
19 #[offset(16)]
20 #[rename(name = "fullPath")]
21 pub full_path: ::unity::Il2CppString,
22 #[offset(24)]
23 #[rename(name = "userPath")]
24 pub user_path: ::unity::Il2CppString,
25 #[offset(32)]
26 #[rename(name = "searchOption")]
27 pub search_option: crate::system::io::searchoption::SearchOption,
28 }
29}
30
31#[cfg(feature = "system-io-directory-types")]
32pub use __types::*;
33
34#[cfg(feature = "system-io-directory")]
35impl Directory {
36 #[doc = "`GetFiles(::unity::Il2CppString)` overload"]
37 pub fn get_files(path: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Array<::unity::Il2CppString> {
38 unsafe {
39 ::unity::il2cpp_call!((::unity::module_base()+0x363c7c0usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
40(::unity::Il2CppString)::core::convert::Into::into(path))
41 }
42 }
43
44 #[doc = "`GetFiles(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
45 pub fn get_files_2(
46 path: impl ::core::convert::Into<::unity::Il2CppString>,
47 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
48 ) -> ::unity::Array<::unity::Il2CppString> {
49 unsafe {
50 ::unity::il2cpp_call!((::unity::module_base()+0x363c890usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
51(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern))
52 }
53 }
54
55 #[doc = "`InternalGetFiles(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` overload"]
56 pub fn internal_get_files(
57 path: impl ::core::convert::Into<::unity::Il2CppString>,
58 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
59 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
60 ) -> ::unity::Array<::unity::Il2CppString> {
61 unsafe {
62 ::unity::il2cpp_call!((::unity::module_base()+0x363c870usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
63(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option))
64 }
65 }
66
67 #[doc = "`GetDirectories(::unity::Il2CppString)` overload"]
68 pub fn get_directories(path: impl ::core::convert::Into<::unity::Il2CppString>) -> ::unity::Array<::unity::Il2CppString> {
69 unsafe {
70 ::unity::il2cpp_call!((::unity::module_base()+0x363ca20usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
71(::unity::Il2CppString)::core::convert::Into::into(path))
72 }
73 }
74
75 #[doc = "`GetDirectories(::unity::Il2CppString, ::unity::Il2CppString)` overload"]
76 pub fn get_directories_2(
77 path: impl ::core::convert::Into<::unity::Il2CppString>,
78 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
79 ) -> ::unity::Array<::unity::Il2CppString> {
80 unsafe {
81 ::unity::il2cpp_call!((::unity::module_base()+0x363caf0usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
82(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern))
83 }
84 }
85
86 #[doc = "`InternalGetDirectories(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` overload"]
87 pub fn internal_get_directories(
88 path: impl ::core::convert::Into<::unity::Il2CppString>,
89 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
90 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
91 ) -> ::unity::Array<::unity::Il2CppString> {
92 unsafe {
93 ::unity::il2cpp_call!((::unity::module_base()+0x363cad0usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
94(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option))
95 }
96 }
97
98 #[doc = "`InternalGetFileDirectoryNames(::unity::Il2CppString, ::unity::Il2CppString, ::unity::Il2CppString, bool, bool, crate::system::io::searchoption::SearchOption, bool)` overload"]
99 pub fn internal_get_file_directory_names(
100 path: impl ::core::convert::Into<::unity::Il2CppString>,
101 user_path_original: impl ::core::convert::Into<::unity::Il2CppString>,
102 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
103 include_files: impl ::core::convert::Into<bool>,
104 include_dirs: impl ::core::convert::Into<bool>,
105 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
106 check_host: impl ::core::convert::Into<bool>,
107 ) -> ::unity::Array<::unity::Il2CppString> {
108 unsafe {
109 ::unity::il2cpp_call!((::unity::module_base()+0x363c930usize)as*mut u8, ::unity::Array< ::unity::Il2CppString> ;
110(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(user_path_original),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(bool)::core::convert::Into::into(include_files),(bool)::core::convert::Into::into(include_dirs),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option),(bool)::core::convert::Into::into(check_host))
111 }
112 }
113
114 #[doc = "`EnumerateFiles(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` overload"]
115 pub fn enumerate_files(
116 path: impl ::core::convert::Into<::unity::Il2CppString>,
117 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
118 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
119 ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::Il2CppString> {
120 unsafe {
121 ::unity::il2cpp_call!((::unity::module_base()+0x363cb90usize)as*mut u8,crate::system::collections::generic::ienumerable_1::IEnumerable_1< ::unity::Il2CppString> ;
122(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option))
123 }
124 }
125
126 #[doc = "`InternalEnumerateFiles(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` overload"]
127 pub fn internal_enumerate_files(
128 path: impl ::core::convert::Into<::unity::Il2CppString>,
129 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
130 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
131 ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::Il2CppString> {
132 unsafe {
133 ::unity::il2cpp_call!((::unity::module_base()+0x363cca0usize)as*mut u8,crate::system::collections::generic::ienumerable_1::IEnumerable_1< ::unity::Il2CppString> ;
134(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option))
135 }
136 }
137
138 #[doc = "`EnumerateFileSystemNames(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption, bool, bool)` overload"]
139 pub fn enumerate_file_system_names(
140 path: impl ::core::convert::Into<::unity::Il2CppString>,
141 search_pattern: impl ::core::convert::Into<::unity::Il2CppString>,
142 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
143 include_files: impl ::core::convert::Into<bool>,
144 include_dirs: impl ::core::convert::Into<bool>,
145 ) -> crate::system::collections::generic::ienumerable_1::IEnumerable_1<::unity::Il2CppString> {
146 unsafe {
147 ::unity::il2cpp_call!((::unity::module_base()+0x363ccc0usize)as*mut u8,crate::system::collections::generic::ienumerable_1::IEnumerable_1< ::unity::Il2CppString> ;
148(::unity::Il2CppString)::core::convert::Into::into(path),(::unity::Il2CppString)::core::convert::Into::into(search_pattern),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option),(bool)::core::convert::Into::into(include_files),(bool)::core::convert::Into::into(include_dirs))
149 }
150 }
151
152 #[doc = "`CreateDirectory(::unity::Il2CppString)` overload"]
153 pub fn create_directory(path: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::system::io::directoryinfo::DirectoryInfo {
154 unsafe {
155 ::unity::il2cpp_call!((::unity::module_base()+0x363cce0usize)as*mut u8,crate::system::io::directoryinfo::DirectoryInfo;
156(::unity::Il2CppString)::core::convert::Into::into(path))
157 }
158 }
159
160 #[doc = "`CreateDirectoriesInternal(::unity::Il2CppString)` overload"]
161 pub fn create_directories_internal(path: impl ::core::convert::Into<::unity::Il2CppString>) -> crate::system::io::directoryinfo::DirectoryInfo {
162 unsafe {
163 ::unity::il2cpp_call!((::unity::module_base()+0x363cf20usize)as*mut u8,crate::system::io::directoryinfo::DirectoryInfo;
164(::unity::Il2CppString)::core::convert::Into::into(path))
165 }
166 }
167
168 #[doc = "`Delete(::unity::Il2CppString)` overload"]
169 pub fn delete(path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
170 unsafe {
171 ::unity::il2cpp_call!((::unity::module_base()+0x363d2f0usize)as*mut u8,();
172(::unity::Il2CppString)::core::convert::Into::into(path))
173 }
174 }
175
176 #[doc = "`RecursiveDelete(::unity::Il2CppString)` overload"]
177 pub fn recursive_delete(path: impl ::core::convert::Into<::unity::Il2CppString>) -> () {
178 unsafe {
179 ::unity::il2cpp_call!((::unity::module_base()+0x363d590usize)as*mut u8,();
180(::unity::Il2CppString)::core::convert::Into::into(path))
181 }
182 }
183
184 #[doc = "`Delete(::unity::Il2CppString, bool)` overload"]
185 pub fn delete_2(path: impl ::core::convert::Into<::unity::Il2CppString>, recursive: impl ::core::convert::Into<bool>) -> () {
186 unsafe {
187 ::unity::il2cpp_call!((::unity::module_base()+0x363d700usize)as*mut u8,();
188(::unity::Il2CppString)::core::convert::Into::into(path),(bool)::core::convert::Into::into(recursive))
189 }
190 }
191
192 #[doc = "`Exists(::unity::Il2CppString)` overload"]
193 pub fn exists(path: impl ::core::convert::Into<::unity::Il2CppString>) -> bool {
194 unsafe {
195 ::unity::il2cpp_call!((::unity::module_base()+0x363d7a0usize)as*mut u8,bool;
196(::unity::Il2CppString)::core::convert::Into::into(path))
197 }
198 }
199
200 #[doc = "`GetCurrentDirectory()` overload"]
201 pub fn get_current_directory() -> ::unity::Il2CppString {
202 unsafe {
203 ::unity::il2cpp_call!((::unity::module_base()+0x363d8e0usize)as*mut u8, ::unity::Il2CppString;
204 )
205 }
206 }
207
208 #[doc = "`InsecureGetCurrentDirectory()` overload"]
209 pub fn insecure_get_current_directory() -> ::unity::Il2CppString {
210 unsafe {
211 ::unity::il2cpp_call!((::unity::module_base()+0x363d900usize)as*mut u8, ::unity::Il2CppString;
212 )
213 }
214 }
215
216 #[doc = "`GetDemandDir(::unity::Il2CppString, bool)` overload"]
217 pub fn get_demand_dir(
218 full_path: impl ::core::convert::Into<::unity::Il2CppString>,
219 this_dir_only: impl ::core::convert::Into<bool>,
220 ) -> ::unity::Il2CppString {
221 unsafe {
222 ::unity::il2cpp_call!((::unity::module_base()+0x363d9e0usize)as*mut u8, ::unity::Il2CppString;
223(::unity::Il2CppString)::core::convert::Into::into(full_path),(bool)::core::convert::Into::into(this_dir_only))
224 }
225 }
226}
227
228#[cfg(feature = "system-io-directory")]
229impl Directory {
230 pub fn get_files_method_info() -> &'static ::unity::il2cpp::MethodInfo {
231 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
232 }
233
234 pub fn get_files_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
235 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[1]
236 }
237
238 pub fn internal_get_files_method_info() -> &'static ::unity::il2cpp::MethodInfo {
239 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[2]
240 }
241
242 pub fn get_directories_method_info() -> &'static ::unity::il2cpp::MethodInfo {
243 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[3]
244 }
245
246 pub fn get_directories_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
247 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[4]
248 }
249
250 pub fn internal_get_directories_method_info() -> &'static ::unity::il2cpp::MethodInfo {
251 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[5]
252 }
253
254 pub fn internal_get_file_directory_names_method_info() -> &'static ::unity::il2cpp::MethodInfo {
255 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[6]
256 }
257
258 pub fn enumerate_files_method_info() -> &'static ::unity::il2cpp::MethodInfo {
259 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[7]
260 }
261
262 pub fn internal_enumerate_files_method_info() -> &'static ::unity::il2cpp::MethodInfo {
263 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[8]
264 }
265
266 pub fn enumerate_file_system_names_method_info() -> &'static ::unity::il2cpp::MethodInfo {
267 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[9]
268 }
269
270 pub fn create_directory_method_info() -> &'static ::unity::il2cpp::MethodInfo {
271 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[10]
272 }
273
274 pub fn create_directories_internal_method_info() -> &'static ::unity::il2cpp::MethodInfo {
275 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[11]
276 }
277
278 pub fn delete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
279 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[12]
280 }
281
282 pub fn recursive_delete_method_info() -> &'static ::unity::il2cpp::MethodInfo {
283 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[13]
284 }
285
286 pub fn delete_2_method_info() -> &'static ::unity::il2cpp::MethodInfo {
287 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[14]
288 }
289
290 pub fn exists_method_info() -> &'static ::unity::il2cpp::MethodInfo {
291 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[15]
292 }
293
294 pub fn get_current_directory_method_info() -> &'static ::unity::il2cpp::MethodInfo {
295 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[16]
296 }
297
298 pub fn insecure_get_current_directory_method_info() -> &'static ::unity::il2cpp::MethodInfo {
299 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[17]
300 }
301
302 pub fn get_demand_dir_method_info() -> &'static ::unity::il2cpp::MethodInfo {
303 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[18]
304 }
305}
306
307#[cfg(feature = "system-io-directory")]
308pub trait IDirectory_SearchDataMethods: IDirectory_SearchData {
309 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` overload"]
310 fn ctor(
311 self,
312 full_path: impl ::core::convert::Into<::unity::Il2CppString>,
313 user_path: impl ::core::convert::Into<::unity::Il2CppString>,
314 search_option: impl ::core::convert::Into<crate::system::io::searchoption::SearchOption>,
315 ) -> () {
316 unsafe {
317 let __receiver = <Directory_SearchData as ::unity::FromIlInstance>::from_il_instance(<Self as ::unity::SystemObject>::as_instance(self));
318 ::unity::il2cpp_call!((::unity::module_base()+0x34d4220usize)as*mut u8,();
319(Directory_SearchData)__receiver,(::unity::Il2CppString)::core::convert::Into::into(full_path),(::unity::Il2CppString)::core::convert::Into::into(user_path),(crate::system::io::searchoption::SearchOption)::core::convert::Into::into(search_option))
320 }
321 }
322}
323
324#[cfg(feature = "system-io-directory")]
325impl<__T: IDirectory_SearchData> IDirectory_SearchDataMethods for __T {}
326
327#[cfg(feature = "system-io-directory")]
328impl Directory_SearchData {
329 pub fn ctor_method_info() -> &'static ::unity::il2cpp::MethodInfo {
330 <Self as ::unity::ClassIdentity>::class().raw().get_methods()[0]
331 }
332}
333
334#[cfg(feature = "system-io-directory")]
335impl Directory_SearchData {
336 #[doc = "`.ctor(::unity::Il2CppString, ::unity::Il2CppString, crate::system::io::searchoption::SearchOption)` — overload selector"]
337 pub fn new(
338 full_path: ::unity::Il2CppString,
339 user_path: ::unity::Il2CppString,
340 search_option: crate::system::io::searchoption::SearchOption,
341 ) -> Self {
342 let this = <Self as ::unity::FromIlInstance>::instantiate().unwrap_or_else(|| {
343 panic!(
344 "{}
345::{}
346 failed to instantiate",
347 ::core::stringify!(Directory_SearchData),
348 ::core::stringify!(new),
349 )
350 });
351 <Self as IDirectory_SearchDataMethods>::ctor(this, full_path, user_path, search_option);
352 this
353 }
354}
355
356#[cfg(feature = "system-io-directory")]
357#[doc(hidden)]
358pub mod prelude {
359 pub use super::{Directory, Directory_SearchData, IDirectory, IDirectory_SearchData, IDirectory_SearchDataMethods};
360 pub use crate::system::object::IObject;
361 #[cfg(feature = "system-object")]
362 pub use crate::system::object::IObjectMethods;
363}