Core Function ParsePath
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> ParsePath ( <path> ) </pre> === Description === Resolve a file name and locate its full path. === Parameters === ==== path ==== The path to use best to use single file...") |
(→Example) |
||
Line 28: | Line 28: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | println( | + | println( "Stack.spk Path is: " . ParsePath("Stack.spk") ); |
+ | println( "calc.exe Path is: " . ParsePath("calc.exe") ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Revision as of 19:02, 19 April 2012
ParsePath ( <path> )
Contents |
Description
Resolve a file name and locate its full path.
Parameters
path
The path to use best to use single file name such as "Stack.spk".
Return Value
Success: Returns absolute path.
Failure: Returns empty string.
Remarks
This will check for the file is current directory then Sputnik exe directory then lib, include folders of current and Sputnik then check for it in all "path" variable and so on.
It attempts to locate the file and return absolute path.
Example
println( "Stack.spk Path is: " . ParsePath("Stack.spk") ); println( "calc.exe Path is: " . ParsePath("calc.exe") );