Core Function ParsePath
From Sputnik Wiki
(Difference between revisions)
m (1 revision) |
(→Example) |
||
(One intermediate revision by one user not shown) | |||
Line 28: | Line 28: | ||
<syntaxhighlight lang="sputnik"> | <syntaxhighlight lang="sputnik"> | ||
− | println( "Stack.spk Path is: " . ParsePath("Stack.spk") ); | + | println( "Stack.spk Path is: " . ParsePath("Collections/Stack.spk") ); |
println( "calc.exe Path is: " . ParsePath("calc.exe") ); | println( "calc.exe Path is: " . ParsePath("calc.exe") ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Core Function]] | [[Category:Core Function]] |
Latest revision as of 11:03, 18 June 2015
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("Collections/Stack.spk") ); println( "calc.exe Path is: " . ParsePath("calc.exe") );