Finds the path to a file or a directory.
Namespace:
SGP.XUtilityAssembly: SGP.XUtility (in SGP.XUtility.dll)
Version: 1.2.3019.18718
Syntax
Parameters
- fileName
- Type: System..::.String
The file name or the directory name with the relative path.
Return Value
The absolute path to the found file or directory including.
Remarks
In fileName are at first evaluated variables (Expand(String, IXVarDictionary, String, String)) and environment variables
(ExpandEnvironmentVariables(String)).
Than the method is trying to find the directory or file at first in the current directory and
and than in the running application folder StartupPath. If it is found (a file or a directory exists),
returns its absolute path.
Otherwise returns only fileName with evaluated variables as a absolute path.
Note:
If is in XServiceManager a service IXSGPToolProjectFolderService
and ProjectFolder is not nullNothingnullptra null reference (Nothing in Visual Basic), ProjectFolder is used
instead of running application folder.

Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | fileName is nullNothingnullptra null reference (Nothing in Visual Basic). |