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
90 auto initial_dir_path =
92
93
94
95 do {
97
99 kTargetSize);
100 if (
name ==
nullptr) {
102 }
104 target_size = strlen(
name);
105
106 char absolute_path[kTargetSize];
107
108
109
111
112
114
116 } else {
118 }
119 namespc->Release();
122}
static char * StrDup(const char *s)
static CStringUniquePtr CreateCStringUniquePtr(char *str)
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)