FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
SearchPathStr Function

This method will search for a file in the disk.

Pascal
function SearchPathStr(const AFileName: String): String;
C++
AnsiString SearchPathStr(const AnsiString AFileName);
Parameters 
Description 
const AFileName: String 
FileName we want to find. 

Fully qualified filename and path to the file.

You can use this method to quickly find files in your application folder. 

 

The order in which this method will search for the file is: 

1) If the path is an absolute path, it will return it. 

2) If the path is relative, it will first search for it in the folder where the application is. 

3) If it couldn't find it, it will search for the file in the folder where the package is, if FlexCel is in a package. This might be useful if you are running for example in IIS where the the path for the Application is the path for IIS and not for your dll.

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!