Files
fastfetch/src/common/path.h
T

16 lines
457 B
C
Raw Normal View History

#pragma once
2026-01-06 09:48:38 +08:00
#include "common/FFstrbuf.h"
#include "common/stringUtils.h"
const char* ffFindExecutableInPath(const char* name, FFstrbuf* result);
2025-11-25 10:32:42 +08:00
static inline bool ffIsAbsolutePath(const char* path)
{
#ifdef _WIN32
return (ffCharIsEnglishAlphabet(path[0]) && path[1] == ':' && (path[2] == '\\' || path[2] == '/')) // drive letter path
|| (path[0] == '\\' && path[1] == '\\'); // UNC path
#else
return path[0] == '/';
#endif
}