1662548c8SAlex Langford STRING_EXTENSION_OUTSIDE(SBFileSpec) 2662548c8SAlex Langford 3662548c8SAlex Langford %extend lldb::SBFileSpec { 4662548c8SAlex Langford #ifdef SWIGPYTHON 5662548c8SAlex Langford %pythoncode %{ 6*6813ef37SMed Ismail Bennani # operator== is a free function, which swig does not handle, so we inject 7*6813ef37SMed Ismail Bennani # our own equality operator here 8*6813ef37SMed Ismail Bennani def __eq__(self, other): 9*6813ef37SMed Ismail Bennani return not self.__ne__(other) 10*6813ef37SMed Ismail Bennani 11662548c8SAlex Langford fullpath = property(str, None, doc='''A read only property that returns the fullpath as a python string.''') 12662548c8SAlex Langford basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''') 13662548c8SAlex Langford dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''') 14662548c8SAlex Langford exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''') 15662548c8SAlex Langford %} 16662548c8SAlex Langford #endif 17662548c8SAlex Langford } 18