SYNOPSIS
#include <tcl.h>
Tcl_SplitPath(path, argcPtr, argvPtr)
char * Tcl_JoinPath(argc, argv, resultPtr)
Tcl_PathType Tcl_GetPathType(path)
ARGUMENTS
- char *path (in)
-
File path in a form appropriate for the current platform (see the filename reference page for acceptable forms for path names).
- int *argcPtr (out)
-
Filled in with number of path elements in path.
- char ***argvPtr (out)
-
*argvPtr will be filled in with the address of an array of pointers to the strings that are the extracted elements of path. There will be *argcPtr valid entries in the array, followed by a NULL entry.
- int argc (in)
-
Number of elements in argv.
- char **argv (in)
-
Array of path elements to merge together into a single path.
- Tcl_DString *resultPtr (in/out)
-
A pointer to an initialized Tcl_DString to which the result of
Tcl_JoinPath() will be appended.
DESCRIPTION
These procedures may be used to disassemble and reassemble file paths in a platform independent manner: they provide C-level access to the same functionality as the file split, file join, and file pathtype commands.
int argc; char *path; char **argv; ... Tcl_SplitPath(string, &argc, &argv);
Then you should eventually free the storage with a call like the following:
Tcl_Free((char *) argv);
If the result of
PORTABILITY
Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022. Windows Server 2025.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.5 Documentation Build 40.