refactoring
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
|
||||
class IOUtils:
|
||||
|
||||
@@ -32,6 +33,12 @@ class IOUtils:
|
||||
orient = "split",
|
||||
index = False)
|
||||
|
||||
@staticmethod
|
||||
def saveDictAsJson(dict, file):
|
||||
IOUtils.ensurePath(file)
|
||||
with open(file, 'w') as outfile:
|
||||
json.dump(dict, outfile)
|
||||
|
||||
@staticmethod
|
||||
def ensurePath(file):
|
||||
directory = os.path.dirname(file)
|
||||
|
||||
Reference in New Issue
Block a user