build/api-examples/FileEntry.cpp¶
Complete program from the FileEntry API reference. Save it at the path shown above and use the build command in the reference page.
Source files · Download FileEntry.cpp
#include "file_explorer.hpp"
#include <cstdio>
#include <cstring>
int main()
{
gaspardos::desktop::FileEntry entry;
entry.name = "readme.txt";
entry.path = "/AHCIDISK0/readme.txt";
std::printf("%s\n", entry.path.c_str());
return entry.directory || entry.bytes != 0 ? 1 : 0;
}