| 16 | static const auto LOGGER = Logger("FileSelection"); |
| 17 | |
| 18 | State::State() { |
| 19 | if (kernel::getPlatform() == kernel::PlatformSimulator) { |
| 20 | char cwd[PATH_MAX]; |
| 21 | if (getcwd(cwd, sizeof(cwd)) != nullptr) { |
| 22 | setEntriesForPath(cwd); |
| 23 | } else { |
| 24 | LOGGER.error("Failed to get current work directory files"); |
| 25 | setEntriesForPath("/"); |
| 26 | } |
| 27 | } else { |
| 28 | setEntriesForPath("/"); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | std::string State::getSelectedChildPath() const { |
| 33 | return file::getChildPath(current_path, selected_child_entry); |
nothing calls this directly
no test coverage detected