cwk_path_get_style.md (1174B)
1 --- 2 title: cwk_path_get_style 3 description: Gets the path style configuration.. 4 --- 5 6 _(since v1.0.0)_ 7 Gets the path style configuration.. 8 9 ## Description 10 ```c 11 enum cwk_path_style cwk_path_get_style(void); 12 ``` 13 14 ## Description 15 This function gets the style configuration which is currently used for the paths. This configuration determines how paths are parsed and generated. 16 17 * ``CWK_STYLE_WINDOWS``: Use backslashes as a separator and volume for the root. 18 * ``CWK_STYLE_UNIX``: Use slashes as a separator and a slash for the root. 19 20 ## Return Value 21 Returns the current path style configuration. 22 23 ## Example 24 ```c 25 #include <cwalk.h> 26 #include <stdio.h> 27 #include <stddef.h> 28 #include <stdlib.h> 29 30 int main(int argc, char *argv[]) 31 { 32 if(cwk_path_get_style() == CWK_STYLE_WINDOWS) { 33 printf("It's the WINDOWS style."); 34 } else { 35 printf("It's the UNIX style."); 36 } 37 38 return EXIT_SUCCESS; 39 } 40 ``` 41 42 Example Ouput: 43 ``` 44 It's the UNIX style. 45 ``` 46 47 ## Changelog 48 49 | Version | Description | 50 |------------|--------------------------------------------------------| 51 | **v1.0.0** | The function is introduced. |