1*06c3fb27SDimitry Andric %feature("docstring", 2*06c3fb27SDimitry Andric "Represents a file." 3*06c3fb27SDimitry Andric ) lldb::SBFile; 4*06c3fb27SDimitry Andric 5*06c3fb27SDimitry Andric %feature("docstring", " 6*06c3fb27SDimitry Andric Initialize a SBFile from a file descriptor. mode is 7*06c3fb27SDimitry Andric 'r', 'r+', or 'w', like fdopen.") lldb::SBFile::SBFile; 8*06c3fb27SDimitry Andric 9*06c3fb27SDimitry Andric %feature("docstring", "initialize a SBFile from a python file object") lldb::SBFile::SBFile; 10*06c3fb27SDimitry Andric 11*06c3fb27SDimitry Andric %feature("autodoc", "Read(buffer) -> SBError, bytes_read") lldb::SBFile::Read; 12*06c3fb27SDimitry Andric %feature("autodoc", "Write(buffer) -> SBError, written_read") lldb::SBFile::Write; 13*06c3fb27SDimitry Andric 14*06c3fb27SDimitry Andric %feature("docstring", " 15*06c3fb27SDimitry Andric Convert this SBFile into a python io.IOBase file object. 16*06c3fb27SDimitry Andric 17*06c3fb27SDimitry Andric If the SBFile is itself a wrapper around a python file object, 18*06c3fb27SDimitry Andric this will return that original object. 19*06c3fb27SDimitry Andric 20*06c3fb27SDimitry Andric The file returned from here should be considered borrowed, 21*06c3fb27SDimitry Andric in the sense that you may read and write to it, and flush it, 22*06c3fb27SDimitry Andric etc, but you should not close it. If you want to close the 23*06c3fb27SDimitry Andric SBFile, call SBFile.Close(). 24*06c3fb27SDimitry Andric 25*06c3fb27SDimitry Andric If there is no underlying python file to unwrap, GetFile will 26*06c3fb27SDimitry Andric use the file descriptor, if available to create a new python 27*06c3fb27SDimitry Andric file object using ``open(fd, mode=..., closefd=False)`` 28*06c3fb27SDimitry Andric ") lldb::SBFile::GetFile; 29