diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-17 22:50:49 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-17 22:50:49 (GMT) |
commit | bc669730611b765ed0bfda105d11996da98d9e30 (patch) | |
tree | 59e3f8a9ae8f94639ff90a9154c45c04b6f9fdbe /Source/kwsys/SystemTools.hxx.in | |
parent | 9a92c429f2f3666e360bbefed3cd14c076edea17 (diff) | |
download | CMake-bc669730611b765ed0bfda105d11996da98d9e30.zip CMake-bc669730611b765ed0bfda105d11996da98d9e30.tar.gz CMake-bc669730611b765ed0bfda105d11996da98d9e30.tar.bz2 |
ENH: Add method to find file in parent directories if it exists
Diffstat (limited to 'Source/kwsys/SystemTools.hxx.in')
-rw-r--r-- | Source/kwsys/SystemTools.hxx.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in index e951206..036c841 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -322,6 +322,12 @@ public: /** Check if the given file or directory is in subdirectory of dir */ static bool IsSubDirectory(const char* fileOrDir, const char* dir); + /** Check if the given file exists in one of the parent directory of the + * given file or directory and if it does, return the name of the file. + * Toplevel specifies the top-most directory to where it will look.*/ + static kwsys_stl::string FileExistsInParentDirectories(const char* fname, + const char* directory, const char* toplevel); + protected: // these two functions can be called from ConvertToOutputPath /** |