resolve path name, resolve directory name, resolve file name
This function resolves specified directory path and file names (containing wildcard symbols in various directory and/or file names) to existing path and file names where
1. The full path name will be checked.
2. If path contains wildcard symbols (Attention: '*' and '?' only), then the matching name will be identified.
If 2 or more matches are found, then an exception will be asserted because the path is ambiguous.
3. If the path begins with a lone tilde symbol ('~/...', '~\...'), then the tilde will be replaced by the user home directory.
4. Wildcards along the full directory path are allowed, e.g. "C:\Prgram Files\*\*\Lib\Support Library*". B4P will search through the different
subdirectories accordingly.
Note:In interactive mode, B4P will automatically capture all 'cd' / 'chdir' / changing drive commands and take care of changing the
directores in the B4P process, too. Reason: Operating System commands executed happen in child processes and changing direcctories have no effect on their parent processes.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
string | path name This path name may contain wildcard symbols which will be resolved. Default value: Current working directory |
Type | Description |
---|---|
string | Fully resolveld path name All wildcards have been resolved. |
if ( system info[operating system] = Windows)
{
echo( resolve path name( "C:\Program*\*\*4P.exe" ) ); // Look for B4p Program
}
else
{
echo( resolve path name( "/usr/*l/*n/*4p" ) ); // Look for /usr/local/bin/b4p
}
echo( resolve path name( "~/" ) ); // Your home directory
echo( resolve path name( "~/.." ) ); // Parent directory of home directory
C:\Program Files\B4P\B4P.exe
C:\Users\zur-b\
C:\Users\