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