File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,23 @@ struct canonFnameCacheTable;
1515extern struct canonFnameCacheTable * canonFnameCacheTableNew (const char * cwd );
1616extern void canonFnameCacheTableDelete (struct canonFnameCacheTable * cache_table );
1717
18- /* Don't free the cstring returned from this function directly.
19- * This function stores the cstring to the cache.
18+ /*
19+ * If INPUT is an absolute path (starting form '/'), return new absolute path
20+ * string after resolving '..', '.', and '//' in it. '//' is reduced to '/'.
21+ *
22+ * If INPUT is a relative path, resolve '.', '..', and '//' as if the current
23+ * working directly is the CWD passed canonFnameCacheTableNew(). The return
24+ * string may absolute or relative path form.
25+ *
26+ * In most of all cases, the string return from this function doesn't
27+ * include ".". There is one exception.
28+ * If the resolved file name is the same as CWD canonFnameCacheTableNew(),
29+ * this function returns just ".".
30+ *
31+ * Don't free the cstring returned from this function directly.
32+ * This function stores the cstring to the CACHE_TABLE for processing the
33+ * same INPUT more than twice. canonFnameCacheTableDelete() destroys all C
34+ * strings returned from this function.
2035 */
2136extern const char * canonicalizeRelativeFileName (struct canonFnameCacheTable * cache_table ,
2237 const char * input );
You can’t perform that action at this time.
0 commit comments