diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-10 16:14:58 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-10 16:14:58 (GMT) |
commit | b221d046a6c1005f2110304c0ca36133e9e96cc4 (patch) | |
tree | da40f01aa8852ced8aae3892df2dd2c84d35f265 /Source/kwsys/SystemTools.hxx.in | |
parent | 890528e0c3e7784710ad3085efe10b0afe3b26a0 (diff) | |
download | CMake-b221d046a6c1005f2110304c0ca36133e9e96cc4.zip CMake-b221d046a6c1005f2110304c0ca36133e9e96cc4.tar.gz CMake-b221d046a6c1005f2110304c0ca36133e9e96cc4.tar.bz2 |
ENH: Add method to retrieve parent directory and for checking if directory is a subdirectory of another directory
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 1d79f2b..89e32a3 100644 --- a/Source/kwsys/SystemTools.hxx.in +++ b/Source/kwsys/SystemTools.hxx.in @@ -316,6 +316,12 @@ public: static bool GetPermissions(const char* file, mode_t& mode); static bool SetPermissions(const char* file, mode_t mode); + /** Get the parent directory of the directory or file */ + static std::string GetParentDirectory(const char* fileOrDir); + + /** Check if the given file or directory is in subdirectory of dir */ + static bool IsSubDirectory(const char* fileOrDir, const char* dir); + protected: // these two functions can be called from ConvertToOutputPath /** |