xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBFileSpecExtensions.i (revision 5f757f3ff9144b609b3c433dfd370cc6bdc191ad)
106c3fb27SDimitry Andric STRING_EXTENSION_OUTSIDE(SBFileSpec)
206c3fb27SDimitry Andric 
306c3fb27SDimitry Andric %extend lldb::SBFileSpec {
406c3fb27SDimitry Andric #ifdef SWIGPYTHON
506c3fb27SDimitry Andric     %pythoncode %{
6*5f757f3fSDimitry Andric         # operator== is a free function, which swig does not handle, so we inject
7*5f757f3fSDimitry Andric         # our own equality operator here
8*5f757f3fSDimitry Andric         def __eq__(self, other):
9*5f757f3fSDimitry Andric             return not self.__ne__(other)
10*5f757f3fSDimitry Andric 
1106c3fb27SDimitry Andric         fullpath = property(str, None, doc='''A read only property that returns the fullpath as a python string.''')
1206c3fb27SDimitry Andric         basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''')
1306c3fb27SDimitry Andric         dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''')
1406c3fb27SDimitry Andric         exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
1506c3fb27SDimitry Andric     %}
1606c3fb27SDimitry Andric #endif
1706c3fb27SDimitry Andric }
18