Module ida_fpro
System independent counterparts of FILE* related functions from Clib.
You should not use C standard I/O functions in your modules. The reason: Each
module compiled with Borland (and statically linked to Borland's library) will
host a copy of the FILE * information.
So, if you open a file in the plugin and pass the handle to the kernel, the
kernel will not be able to use it.
If you really need to use the standard functions, define
USE_STANDARD_FILE_FUNCTIONS. In this case do not mix them with q... functions.
Functions
def qfile_t_from_capsule(*args) ‑> qfile_t *
-
qfile_t_from_capsule(pycapsule) -> qfile_tpycapsule: PyObject *
def qfile_t_from_fp(*args) ‑> qfile_t *
-
qfile_t_from_fp(fp) -> qfile_tfp: FILE *
def qfile_t_tmpfile(*args) ‑> qfile_t *
-
qfile_t_tmpfile() -> qfile_t
Classes
class qfile_t (*args)
-
A helper class to work with FILE related functions.__init__(self, rhs) -> qfile_trhs: qfile_t const &__init__(self, pycapsule=None) -> qfile_tpycapsule: PyObject *
Static methods
def from_capsule(*args) ‑> qfile_t *
-
from_capsule(pycapsule) -> qfile_tpycapsule: PyObject *
def from_fp(*args) ‑> qfile_t *
-
from_fp(fp) -> qfile_tfp: FILE *
def tmpfile(*args) ‑> qfile_t *
-
tmpfile() -> qfile_tA static method to construct an instance using a temporary file
Methods
def close(self, *args) ‑> void
-
close(self)Closes the file
def filename(self, *args) ‑> PyObject *
-
filename(self) -> PyObject *
def flush(self, *args) ‑> int
-
flush(self) -> int
def get_byte(self, *args) ‑> PyObject *
-
get_byte(self) -> PyObject *Reads a single byte from the file. Returns None if EOF or the read byte
def get_fp(self, *args) ‑> FILE *
-
get_fp(self) -> FILE *
def gets(self, *args) ‑> PyObject *
-
gets(self, size) -> PyObject *Reads a line from the input file. Returns the read line or Nonesize: int
def open(self, *args) ‑> bool
-
open(self, filename, mode) -> boolOpens a filefilename: the file namemode: The mode string, ala fopen() stylereturn: Boolean
def opened(self, *args) ‑> bool
-
opened(self) -> boolChecks if the file is opened or not
def put_byte(self, *args) ‑> int
-
put_byte(self, chr) -> intWrites a single byte to the filechr: int
def puts(self, *args) ‑> int
-
puts(self, str) -> intstr: char const *
def read(self, *args) ‑> PyObject *
-
read(self, size) -> PyObject *Reads from the file. Returns the buffer or Nonesize: int
def readbytes(self, *args) ‑> PyObject *
-
readbytes(self, size, big_endian) -> PyObject *Similar to read() but it respect the endiannesssize: intbig_endian: bool
def seek(self, *args) ‑> int
-
seek(self, offset, whence=SEEK_SET) -> intSet input source positionoffset: int64whence: intreturn: the new position (not 0 as fseek!)
def size(self, *args) ‑> int64
-
size(self) -> int64
def tell(self, *args) ‑> int64
-
tell(self) -> int64Returns the current position
def write(self, *args) ‑> int
-
write(self, py_buf) -> intWrites to the file. Returns 0 or the number of bytes writtenpy_buf: PyObject *
def writebytes(self, *args) ‑> int
-
writebytes(self, py_buf, big_endian) -> intSimilar to write() but it respect the endiannesspy_buf: PyObject *big_endian: bool