def saveAllRecords(): global recordContents, isSetTitle if "isSaveActions" not in uni.MySettings.keys() or uni.getBoolValue("isSaveActions"): if fu.isFile(fu.recordFilePath) is False: create() setRecordType(1) fu.addToFile(fu.recordFilePath, recordContents) restoreRecordType() recordContents = "" isSetTitle = False
def saveAllRecords(): global recordContents, isSetTitle if "isSaveActions" not in uni.MySettings.keys() or uni.getBoolValue( "isSaveActions"): if fu.isFile(fu.recordFilePath) is False: create() setRecordType(1) fu.addToFile(fu.recordFilePath, recordContents) restoreRecordType() recordContents = "" isSetTitle = False
def read(_recordFilePath=None): if _recordFilePath is None: _recordFilePath = fu.recordFilePath if fu.isFile(_recordFilePath): return fu.readFromFile(_recordFilePath, "utf-8") else: create() setRecordType(1) fu.addToFile(_recordFilePath, recordContents) restoreRecordType() return recordContents