public long SaveToFile(string filePath) { string backupPath = filePath + ".bak"; try { if (Lfs.IsFileExists(filePath)) { Lfs.CopyFile(filePath, backupPath); } } catch (Exception ex) { ex._Error(); } return(Lfs.WriteJsonToFile(filePath, this, flags: FileFlags.AutoCreateDirectory | FileFlags.OnCreateSetCompressionFlag)); }