mirror of
https://github.com/ModOrganizer2/modorganizer-plugin_python.git
synced 2026-07-27 14:03:33 -07:00
23 lines
534 B
C++
23 lines
534 B
C++
#include "pybind11_qt/pybind11_qt.h"
|
|
|
|
#include <pybind11/functional.h>
|
|
#include <pybind11/pybind11.h>
|
|
|
|
#include "ifiletree.h"
|
|
|
|
using namespace MOBase;
|
|
|
|
PYBIND11_MODULE(filetree, m)
|
|
{
|
|
// test the FileTypes stuff
|
|
m.def("is_file", [](IFileTree::FileTypes const& t) {
|
|
return t.testFlag(IFileTree::FILE);
|
|
});
|
|
m.def("is_directory", [](IFileTree::FileTypes const& t) {
|
|
return t.testFlag(IFileTree::DIRECTORY);
|
|
});
|
|
m.def("value", [](IFileTree::FileTypes const& t) {
|
|
return t.toInt();
|
|
});
|
|
}
|