diff --git a/src/AST/TranslationUnit.cs b/src/AST/TranslationUnit.cs index ac8f9316..1e1d36c0 100644 --- a/src/AST/TranslationUnit.cs +++ b/src/AST/TranslationUnit.cs @@ -57,5 +57,23 @@ namespace CppSharp.AST /// Contains the include path. public string IncludePath; + + public string FileRelativeDirectory + { + get + { + var path = IncludePath.Replace('\\', '/'); + var index = path.LastIndexOf('/'); + return path.Substring(0, index); + } + } + + public string FileRelativePath + { + get + { + return Path.Combine(FileRelativeDirectory, FileName); + } + } } } \ No newline at end of file