SBFile¶
- class lldb.SBFile(*args)¶
Represents a file.
Methods Summary
Close
(SBFile self)initialize a SBFile from a python file object
Create
(file[, borrow, force_io_methods])Create a SBFile from a python file object, with options.
Flush
(SBFile self)initialize a SBFile from a python file object
GetFile
(SBFile self)Convert this SBFile into a python io.IOBase file object.
IsValid
(SBFile self)initialize a SBFile from a python file object
MakeBorrowed
(lldb)initialize a SBFile from a python file object
initialize a SBFile from a python file object
MakeForcingIOMethods
(lldb)initialize a SBFile from a python file object
Read
(buffer)initialize a SBFile from a python file object
Write
(buffer)initialize a SBFile from a python file object
Methods Documentation
- classmethod Create(file, borrow=False, force_io_methods=False)¶
Create a SBFile from a python file object, with options.
If borrow is set then the underlying file will not be closed when the SBFile is closed or destroyed.
If force_scripting_io is set then the python read/write methods will be called even if a file descriptor is available.
- Flush(SBFile self)¶
initialize a SBFile from a python file object
- GetFile(SBFile self) → lldb::FileSP¶
Convert this SBFile into a python io.IOBase file object.
If the SBFile is itself a wrapper around a python file object, this will return that original object.
The file returned from here should be considered borrowed, in the sense that you may read and write to it, and flush it, etc, but you should not close it. If you want to close the SBFile, call SBFile.Close().
If there is no underlying python file to unwrap, GetFile will use the file descriptor, if available to create a new python file object using
open(fd, mode=..., closefd=False)
- IsValid(SBFile self) → bool¶
initialize a SBFile from a python file object
- static MakeBorrowedForcingIOMethods(lldb::FileSP BORROWED_FORCE_IO_METHODS) → SBFile¶
initialize a SBFile from a python file object