vul_expand_path.h
Go to the documentation of this file.
1 // This is core/vul/vul_expand_path.h
2 #ifndef vul_expand_path_h_
3 #define vul_expand_path_h_
4 //:
5 // \file
6 // \brief Contains two functions to compute expanded form of a given path.
7 //
8 // Given a path in the file system, compute an expanded form.
9 // An expanded path is one which does not
10 // - involve any symbolic links
11 // - involve any . or ..
12 // - begin with a ~
13 // - contain any trailing or repeated /
14 //
15 // The result of each query is cached so that a subsequent
16 // query on the same path will be much faster and will not
17 // involve any system calls.
18 //
19 // \author fsm
20 //
21 // \verbatim
22 // Modifications
23 // PDA (Manchester) 21/03/2001: Tidied up the documentation
24 // Peter Vanroose 27/05/2001: Corrected the documentation
25 // \endverbatim
26 
27 #include <string>
28 #ifdef _MSC_VER
29 # include <vcl_msvc_warnings.h>
30 #endif
31 #include <vxl_config.h>
32 
33 //: Expand given path.
34 std::string vul_expand_path/*cached*/(std::string path);
35 
36 //: Expand given path.
37 std::string vul_expand_path_uncached (std::string path);
38 
39 #if defined(_WIN32) && VXL_USE_WIN_WCHAR_T
40 
41 //: Expand given path.
42 std::wstring vul_expand_path/*cached*/(std::wstring path);
43 
44 //: Expand given path.
45 std::wstring vul_expand_path_uncached (std::wstring path);
46 
47 #endif
48 
49 #endif // vul_expand_path_h_
std::string vul_expand_path_uncached(std::string path)
Expand given path.
std::string vul_expand_path(std::string path)
Expand given path.