Skip to content

build/api-examples/NativeFileAccess.cpp

Complete program from the NativeFileAccess API reference. Save it at the path shown above and use the build command in the reference page.

Source files · Download NativeFileAccess.cpp

#include "desktop_native.hpp"
#include <cstdio>
#include <cstring>

int main()
{
    gaspardos::desktop::NativeFileAccess access;
    gaspardos::desktop::FileEntry        entry;
    return access.stat("/AHCIDISK0", entry) == 0 && entry.directory ? 0 : 1;
}