IDAPython 9.0
Loading...
Searching...
No Matches
qfile_t Class Reference
Inheritance diagram for qfile_t:

Public Member Functions

 __init__ (self, *args)
 
 opened (self)
 
 close (self)
 
 open (self, filename, mode)
 
'FILE *' get_fp (self)
 
 seek (self, offset, whence=ida_idaapi.SEEK_SET)
 
 tell (self)
 
 readbytes (self, size, big_endian)
 
 read (self, size)
 
 gets (self, len)
 
 writebytes (self, size, big_endian)
 
 write (self, buf)
 
int puts (self, str str)
 
'int64' size (self)
 
 flush (self)
 
'PyObject *' filename (self)
 
 get_byte (self)
 
 put_byte (self)
 

Static Public Member Functions

'qfile_t *' from_fp ('FILE *' fp)
 
'qfile_t *' from_capsule ('PyObject *' pycapsule)
 
 tmpfile ()
 

Properties

 thisown
 

Detailed Description

A helper class to work with FILE related functions.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )

Member Function Documentation

◆ close()

close ( self)
Closes the file

◆ filename()

'PyObject *' filename ( self)

◆ flush()

flush ( self)

◆ from_capsule()

'qfile_t *' from_capsule ( 'PyObject *' pycapsule)
static

◆ from_fp()

'qfile_t *' from_fp ( 'FILE *' fp)
static

◆ get_byte()

get_byte ( self)
Reads a single byte from the file. Returns None if EOF or the read byte

◆ get_fp()

'FILE *' get_fp ( self)

◆ gets()

gets ( self,
len )
Reads a line from the input file. Returns the read line or None

@param len: the maximum line length

◆ open()

open ( self,
filename,
mode )
Opens a file

@param filename: the file name
@param mode: The mode string, ala fopen() style
@return: Boolean

◆ opened()

opened ( self)
Checks if the file is opened or not

◆ put_byte()

put_byte ( self)
Writes a single byte to the file

@param chr: the byte value

◆ puts()

int puts ( self,
str str )

◆ read()

read ( self,
size )
Reads from the file. Returns the buffer or None

@param size: the maximum number of bytes to read
@return: a str, or None

◆ readbytes()

readbytes ( self,
size,
big_endian )
Similar to read() but it respect the endianness

@param size: the maximum number of bytes to read
@param big_endian: endianness
@return a str, or None

◆ seek()

seek ( self,
offset,
whence = ida_idaapi.SEEK_SET )
Set input source position

@param offset: the seek offset
@param whence: the position to seek from
@return: the new position (not 0 as fseek!)

◆ size()

'int64' size ( self)

◆ tell()

tell ( self)
Returns the current position

◆ tmpfile()

tmpfile ( )
static
A static method to construct an instance using a temporary file

◆ write()

write ( self,
buf )
Writes to the file. Returns 0 or the number of bytes written

@param buf: the str to write
@return: result code

◆ writebytes()

writebytes ( self,
size,
big_endian )
Similar to write() but it respect the endianness

@param buf: the str to write
@param big_endian: endianness
@return: result code

Property Documentation

◆ thisown

thisown
static
Initial value:
= property(lambda x: x.this.own(), lambda x, v: x.this.own(v),
doc='The membership flag')

The documentation for this class was generated from the following file: