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

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

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

Inherited from object: __class__

Method Details

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__init__(self, rhs)
(Constructor)

 

__init__(self, pycobject=None) -> qfile_t

Closes the file

Returns: qfile_t
Overrides: object.__init__

open(self, filename, mode)

 

Opens a file

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

seek(self, offset, whence=SEEK_SET)

 

Set input source position

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

read(self, size)

 

Reads from the file. Returns the buffer or None

Returns: PyObject *

gets(self, size)

 

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

Returns: PyObject *

write(self, py_buf)

 

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

Returns: int

flush(self)

 

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

Returns: int

Property Details

thisown

The membership flag

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

__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__)