Mana
Path.h
Go to the documentation of this file.
1 
8 #pragma once
9 #include "../runner/common/Setup.h"
10 #if defined(MANA_TARGET_WINDOWS)
11 #endif
12 
13 #if !defined(_MAX_PATH)
14 #define _MAX_PATH 260
15 #endif
16 
17 #if !defined(_MAX_DRIVE)
18 #define _MAX_DRIVE 3
19 #endif
20 
21 #if !defined(_MAX_DIR)
22 #define _MAX_DIR 256
23 #endif
24 
25 #if !defined(_MAX_FNAME)
26 #define _MAX_FNAME 256
27 #endif
28 
29 #if !defined(_MAX_EXT)
30 #define _MAX_EXT 256
31 #endif
32 
33 namespace mana
34 {
38  extern void makepath(char* path, const size_t pathCount, const char* drive, const char* dir, const char* file, const char* ext);
39 
43  extern void splitpath(const char* sptr, char* drive, const size_t driveCount, char* dir, const size_t dirCount, char* file, const size_t fileCount, char* ext, const size_t extCount);
44 
48  extern char* fullpath(char* out, const char* in, const size_t size);
49 
53  extern int chdir(const char* path);
54 
58 #if defined(MANA_TARGET_WINDOWS)
59  constexpr char PathSeparator() { return '\\'; }
60 #else
61  constexpr char PathSeparator() { return '/'; }
62 #endif
63 }
Definition: CodeBuffer.cpp:12
void makepath(char *path, const size_t pathCount, const char *drive, const char *dir, const char *file, const char *ext)
Definition: Path.cpp:19
void splitpath(const char *sptr, char *drive, const size_t driveCount, char *dir, const size_t dirCount, char *file, const size_t fileCount, char *ext, const size_t extCount)
Definition: Path.cpp:53
constexpr char PathSeparator()
Definition: Path.h:61
int chdir(const char *path)
Definition: Path.cpp:118
char * fullpath(char *out, const char *in, const size_t size)
Definition: Path.cpp:101