Module ida_fpro :: Class qfile_t
[frames] | no frames]

Class qfile_t

object --+
         |
        qfile_t

Proxy of C++ qfile_t class.

A helper class to work with FILE related functions.

Instance Methods
qfile_t
__init__(self, rhs)
__init__(self, pycapsule=None) -> qfile_t
 
__repr__(self)
repr(x)
 
__swig_destroy__(self)
 
close(self)
PyObject *
filename(self)
int
flush(self)
Reads a single byte from the file.
PyObject *
get_char(self)
FILE *
get_fp(self)
PyObject *
gets(self, size)
Reads a line from the input file.
bool
open(self, filename, mode)
Opens a file
bool
opened(self)
Checks if the file is opened or not
int
put_char(self, chr)
int
puts(self, str)
PyObject *
read(self, size)
Reads from the file.
PyObject *
readbytes(self, size, big_endian)
Similar to read() but it respect the endianness
int
seek(self, offset, whence=SEEK_SET)
Set input source position
int64
size(self)
int64
tell(self)
Returns the current position
int
write(self, py_buf)
Writes to the file.
int
writebytes(self, py_buf, big_endian)
Similar to write() but it respect the endianness

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods
qfile_t
from_capsule(pycapsule)
qfile_t
from_fp(fp)
qfile_t
tmpfile()
A static method to construct an instance using a temporary file
Properties
  __idc_cvt_id__
qfile_t___idc_cvt_id___get(self) -> int
  thisown
The membership flag

Inherited from object: __class__

Method Details

__init__(self, rhs)
(Constructor)

 

__init__(self, pycapsule=None) -> qfile_t

Closes the file

Returns: qfile_t
Overrides: object.__init__

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

flush(self)

 

Reads a single byte from the file. Returns None if EOF or the read byte

Returns: int

gets(self, size)

 

Reads a line from the input file. Returns the read line or None

Returns: PyObject *

open(self, filename, mode)

 

Opens a file

Parameters:
  • filename - the file name
  • mode - The mode string, ala fopen() style
Returns: bool
Boolean

read(self, size)

 

Reads from the file. Returns the buffer or None

Returns: PyObject *

seek(self, offset, whence=SEEK_SET)

 

Set input source position

Returns: int
the new position (not 0 as fseek!)

write(self, py_buf)

 

Writes to the file. Returns 0 or the number of bytes written

Returns: int

Property Details

__idc_cvt_id__

qfile_t___idc_cvt_id___get(self) -> int

Get Method:
unreachable.qfile_t___idc_cvt_id___get(self)
Set Method:
unreachable.qfile_t___idc_cvt_id___set(self, __idc_cvt_id__)

thisown

The membership flag

Get Method:
unreachable(x)
Set Method:
unreachable(x, v)