summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python/interface/SBFileSpec.i
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/Python/interface/SBFileSpec.i')
-rw-r--r--lldb/scripts/Python/interface/SBFileSpec.i14
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBFileSpec.i b/lldb/scripts/Python/interface/SBFileSpec.i
index d3fae44de8b..ae23c8fd5fc 100644
--- a/lldb/scripts/Python/interface/SBFileSpec.i
+++ b/lldb/scripts/Python/interface/SBFileSpec.i
@@ -68,6 +68,20 @@ public:
GetDescription (lldb::SBStream &description) const;
%pythoncode %{
+ def __get_fullpath__(self):
+ spec_dir = self.GetDirectory()
+ spec_file = self.GetFilename()
+ if spec_dir and spec_file:
+ return '%s/%s' % (spec_dir, spec_file)
+ elif spec_dir:
+ return spec_dir
+ elif spec_file:
+ return spec_file
+ return None
+
+ __swig_getmethods__["fullpath"] = __get_fullpath__
+ if _newclass: x = property(__get_fullpath__, None)
+
__swig_getmethods__["basename"] = GetFilename
if _newclass: x = property(GetFilename, None)
OpenPOWER on IntegriCloud