MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / script_register_stdfs

Function script_register_stdfs

ogsr_engine/xrGame/fs_registrator_script.cpp:234–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232
233
234void script_register_stdfs(lua_State* L)
235{
236 using self = stdfs::directory_entry;
237
238 module(L, "stdfs")[(def("VerifyPath", [](const char* path) { VerifyPath(path); }), def("directory_iterator", &directory_iterator),
239 def("recursive_directory_iterator", &recursive_directory_iterator),
240 class_<self>("path")
241 .def(constructor<const char*>())
242 // TODO: при необходимости можно будет добавить возможность изменения некоторых свойств.
243 .property("full_path_name", &get_full_path)
244 .property("full_filename", &get_full_filename)
245 .property("short_filename", &get_short_filename)
246 .property("extension", &get_extension)
247 .property("last_write_time", &get_last_write_time)
248 .property("last_write_time_string", &get_last_write_time_string)
249 .property("last_write_time_string_short", &get_last_write_time_string_short)
250 .def("exists", (bool(self::*)() const)(&self::exists))
251 .def("is_regular_file", (bool(self::*)() const)(&self::is_regular_file))
252 .def("is_directory", (bool(self::*)() const)(&self::is_directory))
253 .def("file_size", (uintmax_t(self::*)() const)(&self::file_size)))];
254}
255////////////////////////////////////////////////////////////////////////////////////////////
256////////////////////////////// SCRIPT C++17 FILESYSTEM - END ///////////////////////////////
257////////////////////////////////////////////////////////////////////////////////////////////

Callers 1

script_registerMethod · 0.85

Calls 4

moduleFunction · 0.85
defFunction · 0.85
VerifyPathFunction · 0.85
propertyMethod · 0.45

Tested by

no test coverage detected