Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
path.h
Go to the documentation of this file.
1
29#ifndef RWSTD_PATH_H_INCLUDED
30#define RWSTD_PATH_H_INCLUDED
31
32#include <string>
33
34
35// creates a directory in the current working directory
36// returns 0 on success, non-zero value on failure
37int
38makedir (const char*);
39
40
41void
42create_symlink (const std::string &dir,
43 const std::string &xname,
44 const std::string &sname);
45
46// returns the pathname of a file `fname' which may be a file name
47// or an absolute or relative pathname; relative pathnames are searched
48// for in the following order
49// 1. if `other' is an absolute pathname, use dirname(other)
50// 1.1. if `other' is a relative pathname, then use cwd() + dirname(other)
51// + fname
52// 2. relative to the ${RWSTD_SRC_ROOT} environment variable, if
53// it is set and non-empty
54// 3. relative to the current working directory
55std::string
56get_pathname (const std::string &fname,
57 const std::string &other = std::string ());
58
59
60#endif // RWSTD_PATH_H_INCLUDED
void create_symlink(const std::string &dir, const std::string &xname, const std::string &sname)
Definition path.cpp:75
int makedir(const char *)
Definition path.cpp:236
std::string get_pathname(const std::string &fname, const std::string &other=std::string())
Definition path.cpp:129