Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Properties | List of all members
CDPL.Base.FileIOStream Class Reference
+ Inheritance diagram for CDPL.Base.FileIOStream:

Public Member Functions

None __init__ (str file_name, str mode='r')
 Initializes the FileIOStream instance. More...
 
None __init__ (str file_name, OpenMode mode=IOStream.OpenMode.IN)
 Initializes the FileIOStream instance. More...
 
str readline (int size=-1)
 
list readlines (int size=-1)
 
FileIOStream xreadlines ()
 
str read (int size=-1)
 
int tell ()
 
int tellr ()
 
None seek (int offs, int whence=0)
 
None seekr (int offs, int whence=0)
 
str next ()
 
bool isClosed ()
 
str getOpenModeString ()
 
OpenMode getOpenModeFlags ()
 
None flush ()
 
None write (object string)
 
None writelines (object iterable)
 
int tellw ()
 
None seekw (int offs, int whence=0)
 
bool getSoftSpace ()
 
None setSoftSpace (bool value)
 
None close ()
 
FileIOStream __iter__ ()
 
- Public Member Functions inherited from CDPL.Base.IStream
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
- Public Member Functions inherited from CDPL.Base.OStream
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 

Properties

 closed = property(isClosed)
 
 mode = property(getOpenModeString)
 
 modeFlags = property(getOpenModeFlags)
 
 softspace = property(getSoftSpace, setSoftSpace)
 
 name = property(getFileName)
 
- Properties inherited from CDPL.Base.IStream
 objectID = property(getObjectID)
 
- Properties inherited from CDPL.Base.OStream
 objectID = property(getObjectID)
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Base.FileIOStream.__init__ ( str  file_name,
str   mode = 'r' 
)

Initializes the FileIOStream instance.

Parameters
file_name
mode

◆ __init__() [2/2]

None CDPL.Base.FileIOStream.__init__ ( str  file_name,
OpenMode   mode = IOStream.OpenMode.IN 
)

Initializes the FileIOStream instance.

Parameters
file_name
mode

Member Function Documentation

◆ readline()

str CDPL.Base.FileIOStream.readline ( int   size = -1)
Parameters
size
Returns

◆ readlines()

list CDPL.Base.FileIOStream.readlines ( int   size = -1)
Parameters
size
Returns

◆ xreadlines()

FileIOStream CDPL.Base.FileIOStream.xreadlines ( )
Returns

◆ read()

str CDPL.Base.FileIOStream.read ( int   size = -1)
Parameters
size
Returns

◆ tell()

int CDPL.Base.FileIOStream.tell ( )
Returns

◆ tellr()

int CDPL.Base.FileIOStream.tellr ( )
Returns

◆ seek()

None CDPL.Base.FileIOStream.seek ( int  offs,
int   whence = 0 
)
Parameters
offs
whence

◆ seekr()

None CDPL.Base.FileIOStream.seekr ( int  offs,
int   whence = 0 
)
Parameters
offs
whence

◆ next()

str CDPL.Base.FileIOStream.next ( )
Returns

◆ isClosed()

bool CDPL.Base.FileIOStream.isClosed ( )
Returns

◆ getOpenModeString()

str CDPL.Base.FileIOStream.getOpenModeString ( )
Returns

◆ getOpenModeFlags()

OpenMode CDPL.Base.FileIOStream.getOpenModeFlags ( )
Returns

◆ write()

None CDPL.Base.FileIOStream.write ( object  string)
Parameters
string

◆ writelines()

None CDPL.Base.FileIOStream.writelines ( object  iterable)
Parameters
iterable

◆ tellw()

int CDPL.Base.FileIOStream.tellw ( )
Returns

◆ seekw()

None CDPL.Base.FileIOStream.seekw ( int  offs,
int   whence = 0 
)
Parameters
offs
whence

◆ getSoftSpace()

bool CDPL.Base.FileIOStream.getSoftSpace ( )
Returns

◆ setSoftSpace()

None CDPL.Base.FileIOStream.setSoftSpace ( bool  value)
Parameters
value

◆ __iter__()

FileIOStream CDPL.Base.FileIOStream.__iter__ ( )
Returns