68 {
69 const char*
name =
nullptr;
72 intptr_t target_size =
74 if (target_size > 0 && target_size < kTargetSize - 1) {
77 }
78 if (
name ==
nullptr) {
80 target_size = strlen(
name);
81 ASSERT(target_size < kTargetSize);
82 }
86 char dir_path[kTargetSize];
87
88
89
91
92
93
94 do {
96
98 kTargetSize);
99 if (
name ==
nullptr) {
101 }
103 target_size = strlen(
name);
104
105 char absolute_path[kTargetSize];
106
107
108
110
111
113
115 } else {
117 }
118 namespc->Release();
120}
static char * StrDup(const char *s)
static bool SetCurrent(Namespace *namespc, const char *path)
static char * CurrentNoScope()
static const char * GetCanonicalPath(Namespace *namespc, const char *path, char *dest=nullptr, int dest_size=0)
static const char * LinkTarget(Namespace *namespc, const char *pathname, char *dest=nullptr, int dest_size=0)
static Type GetType(Namespace *namespc, const char *path, bool follow_links)
static Namespace * Create(intptr_t namespc)
static intptr_t Default()
static char * GetDirectoryFromPath(const char *path, char *dir)
static const char * GetFileNameFromPath(const char *path)
CAllocUniquePtr< char > CStringUniquePtr