|
Crossfire Server, Trunk
1.75.0
|
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 | |
| datafile_name | |
| filename | |
Plain text storage for Crossfire data
Definition at line 23 of file CFDataFile.py.
| def CFDataFile.CFDataFile.__init__ | ( | self, | |
| datafile_name | |||
| ) |
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 CFDataFile.py.
| def CFDataFile.CFDataFile.exists | ( | self | ) |
checks for datafile - no need to load it yet
Definition at line 32 of file CFDataFile.py.
References CFDataFile.CFDataFile.filename.
| 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 CFDataFile.py.
References CFDataFile.CFDataFile.filename, and CFBank.open().
Here is the call graph for this function:| def CFDataFile.CFDataFile.make_file | ( | self, | |
| header | |||
| ) |
creates a datafile, making the column header from a list passed in
Definition at line 39 of file CFDataFile.py.
References CFDataFile.CFDataFile.datafile_name, CFDataFile.CFDataFile.filename, and CFBank.open().
Here is the call graph for this function:| def CFDataFile.CFDataFile.putData | ( | self, | |
| dic | |||
| ) |
Writes dictionary to formatted file - uses | character as a delimiter
Definition at line 72 of file CFDataFile.py.
References CFDataFile.CFDataFile.datafile_name, CFDataFile.CFDataFile.filename, list, and CFBank.open().
Here is the call graph for this function:| CFDataFile.CFDataFile.datafile_name |
Definition at line 29 of file CFDataFile.py.
Referenced by CFDataFile.CFDataFile.make_file(), and CFDataFile.CFDataFile.putData().
| CFDataFile.CFDataFile.filename |
Definition at line 30 of file CFDataFile.py.
Referenced by CFDataFile.CFDataFile.exists(), CFDataFile.CFDataFile.getData(), CFDataFile.CFDataFile.make_file(), and CFDataFile.CFDataFile.putData().