mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 19:22:30 +00:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
965 changed files with 264882 additions and 0 deletions
30
src/util/Filesystem.cpp
Normal file
30
src/util/Filesystem.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "util/Filesystem.hpp"
|
||||
#include <cstring>
|
||||
#include <storm/String.hpp>
|
||||
|
||||
void OsCreateDirectory(const char* pathName, int32_t recursive) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void OsBuildFontFilePath(const char* fileName, char* buffer, size_t size) {
|
||||
SStrPrintf(buffer, size, "%s\\%s", "Fonts", fileName);
|
||||
}
|
||||
|
||||
char* OsPathFindExtensionWithDot(char* pathName) {
|
||||
char* v1;
|
||||
char* result;
|
||||
|
||||
v1 = strrchr(pathName, '\\');
|
||||
|
||||
if (!v1) {
|
||||
v1 = strrchr(pathName, '/');
|
||||
}
|
||||
|
||||
result = strrchr(pathName, '.');
|
||||
|
||||
if (!result || (v1 && v1 >= result)) {
|
||||
result = (char*)&pathName[strlen(pathName)];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue