-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.h
More file actions
47 lines (33 loc) · 1.03 KB
/
functions.h
File metadata and controls
47 lines (33 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef FUNCTIONS_H_GUARD_3498urewjfdc
#define FUNCTIONS_H_GUARD_3498urewjfdc
#include "../classes/Status.h"
#include "../classes/Filename.h"
#include <string>
namespace fs {
struct PathAndName {
Filename path;
Filename filename;
};
Status createDirectory(Filename const & path);
// returns the path w/o the filename
Filename extractPath(Filename const & path);
// returns the filename w/o the path and extensions
Filename extractFilename(Filename const & path);
// returns both
PathAndName extractPathAndName(Filename const & path);
template<typename T>
std::basic_string<T> extractPath(std::basic_string<T> const & path);
template<typename T>
std::basic_string<T> extractFilename(std::basic_string<T> const & path);
template<typename T>
struct basic_PathAndName {
std::basic_string<T> path;
std::basic_string<T> filename;
};
template<typename T>
basic_PathAndName<T> extractPathAndName(std::basic_string<T> const & path);
}
#include "extractPath.hpp"
#include "extractFilename.hpp"
#include "extractPathAndName.hpp"
#endif