#include #include int os·exists(byte *path, int flag) { return access(path, flag) == 0; } int os·sep(void) { #if defined(UNIX) || defined(__linux__) return '/'; #elif defined(WIN32) return '\\'; #else panicf("unrecognized operating system"); return '\0'; #endif } byte* os·basename(byte *path) { byte *sep; sep = utf8·findrrune(path, os·sep()); return sep+1; }