]>
Commit | Line | Data |
---|---|---|
1 | // | |
2 | // UtilPath.hpp | |
3 | // CPPUtil | |
4 | // | |
5 | // Created by James McIlree on 4/8/13. | |
6 | // Copyright (c) 2013 Apple. All rights reserved. | |
7 | // | |
8 | ||
9 | #ifndef CPPUtil_UtilPath_hpp | |
10 | #define CPPUtil_UtilPath_hpp | |
11 | ||
12 | class Path { | |
13 | public: | |
14 | /* | |
15 | * INPUT OUTPUT | |
16 | * | |
17 | * /tmp/scratch.tiff scratch.tiff | |
18 | * /tmp/scratch scratch | |
19 | * /tmp/ tmp | |
20 | * scratch scratch | |
21 | * /mach_kernel mach_kernel | |
22 | * / / | |
23 | */ | |
24 | static std::string basename(const char* path); | |
25 | static std::string basename(std::string& path); | |
26 | ||
27 | static bool exists(const char* path); | |
28 | static bool exists(std::string& path); | |
29 | ||
30 | static bool is_file(const char* path, bool should_resolve_symlinks); | |
31 | static bool is_file(std::string& path, bool should_resolve_symlinks); | |
32 | }; | |
33 | ||
34 | #endif |