Browse Source

Added properties FileRelativeDirectory and FileRelativePath to TranslationUnit.

pull/224/head
marcos henrich 11 years ago committed by triton
parent
commit
1ad7481136
  1. 18
      src/AST/TranslationUnit.cs

18
src/AST/TranslationUnit.cs

@ -57,5 +57,23 @@ namespace CppSharp.AST
/// Contains the include path. /// Contains the include path.
public string IncludePath; 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);
}
}
} }
} }
Loading…
Cancel
Save