mirror of
https://github.com/likle/cwalk.git
synced 2026-10-28 09:44:01 +00:00
fix reference in cwk_path_join doc
This commit is contained in:
1 parent
08e7520d33
commit
9849af4bd0
1 file changed
+7
-7
@@ -3,7 +3,7 @@ title: cwk_path_join
|
||||
description: Joins two paths together.
|
||||
---
|
||||
|
||||
_(since v1.0.0)_
|
||||
_(since v1.0.0)_
|
||||
Joins two paths together.
|
||||
|
||||
## Description
|
||||
@@ -33,18 +33,18 @@ Returns the total amount of characters of the full, combined path.
|
||||
| UNIX | ``hello/there`` | ``..`` | ``hello`` |
|
||||
| UNIX | ``hello`` | ``there`` | ``hello/there`` |
|
||||
| WINDOWS | ``this\`` | ``C:\..\..\is\a\test\`` | ``is\a\test`` |
|
||||
| WINDOWS | ``C:\this\path`` | ``C:\is\a\test\`` | ``C:\this\path\C:\is\a\test`` |
|
||||
| WINDOWS | ``C:\this\path`` | ``C:\is\a\test\`` | ``C:\this\path\C:\is\a\test`` |
|
||||
| WINDOWS | ``C:\this\path`` | ``C:\..\is\a\test\`` | ``C:\this\path\is\a\test`` |
|
||||
| WINDOWS | ``\\s1\unc\path`` | ``\\s2\unc\pa`` | ``\\s1\unc\pa\s2\unc\path`` |
|
||||
|
||||
### Style
|
||||
The style is automatically chosen during compile time, which is
|
||||
The style is automatically chosen during compile time, which is
|
||||
UNIX for macOS and linux and WINDOWS for windows. You can change the style
|
||||
using [cwk_path_join]({{ site.baseurl }}{% link reference/cwk_path_join.md %}).
|
||||
using [cwk_path_set_style]({{ site.baseurl }}{% link reference/cwk_path_set_style.md %}).
|
||||
|
||||
### Result
|
||||
The **path_b** parameter will always be treated as a relative path, so even if
|
||||
a driver letter is submitted on a windows style path, it will be treated as a
|
||||
The **path_b** parameter will always be treated as a relative path, so even if
|
||||
a driver letter is submitted on a windows style path, it will be treated as a
|
||||
folder.
|
||||
|
||||
## Example
|
||||
@@ -57,7 +57,7 @@ folder.
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char buffer[FILENAME_MAX];
|
||||
|
||||
|
||||
cwk_path_join("hello/there", "../world", buffer, sizeof(buffer));
|
||||
printf("The combined path is: %s", buffer);
|
||||
|
||||
|
||||
Reference in new issue
Block a user