Crossfire Server, Trunk
CFDataFile.CFDataFile Class Reference
+ Collaboration diagram for CFDataFile.CFDataFile:

Public Member Functions

def __init__ (self, datafile_name)
def exists (self)
def getData (self)
def make_file (self, header)
def putData (self, dic)

Data Fields


Detailed Description

Plain text storage for Crossfire data

Definition at line 23 of file

Constructor & Destructor Documentation

◆ __init__()

def CFDataFile.CFDataFile.__init__ (   self,
make datafile paths for datafile 'object'
- these all go in ../var/crossfire/datafiles to keep the local dir clean

Definition at line 26 of file

Member Function Documentation

◆ exists()

def CFDataFile.CFDataFile.exists (   self)
checks for datafile - no need to load it yet

Definition at line 32 of file

References CFDataFile.CFDataFile.filename.

◆ getData()

def CFDataFile.CFDataFile.getData (   self)
Gets the formatted file as a dictionary
The # key contains the column headers for the file and indicates the 'primary' key

Definition at line 54 of file

References CFDataFile.CFDataFile.filename,, and split().

+ Here is the call graph for this function:

◆ make_file()

def CFDataFile.CFDataFile.make_file (   self,
creates a datafile, making the column header from a list passed in

Definition at line 39 of file

References CFDataFile.CFDataFile.datafile_name, CFDataFile.CFDataFile.filename,, and make_face_from_files.str.

+ Here is the call graph for this function:

◆ putData()

def CFDataFile.CFDataFile.putData (   self,
Writes dictionary to formatted file - uses | character as a delimiter

Definition at line 72 of file

References CFDataFile.CFDataFile.datafile_name, CFDataFile.CFDataFile.filename, guildoracle.list,, and make_face_from_files.str.

+ Here is the call graph for this function:

Field Documentation

◆ datafile_name


Definition at line 29 of file

Referenced by CFDataFile.CFDataFile.make_file(), and CFDataFile.CFDataFile.putData().

◆ filename

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