parent
5211c407ff
commit
8fe29c5b89
12 changed files with 320 additions and 60 deletions
|
@ -49,8 +49,15 @@ class FileConfigProvider(BaseProvider):
|
|||
def volume_file_exists(self, filename):
|
||||
return os.path.exists(os.path.join(self.config_volume, filename))
|
||||
|
||||
def get_volume_file(self, filename, mode='r'):
|
||||
return open(os.path.join(self.config_volume, filename), mode)
|
||||
def get_volume_file(self, filename):
|
||||
return open(os.path.join(self.config_volume, filename))
|
||||
|
||||
def write_volume_file(self, filename, contents):
|
||||
filepath = os.path.join(self.config_volume, filename)
|
||||
with open(filepath, mode='w') as f:
|
||||
f.write(contents)
|
||||
|
||||
return filepath
|
||||
|
||||
def save_volume_file(self, filename, flask_file):
|
||||
filepath = os.path.join(self.config_volume, filename)
|
||||
|
|
Reference in a new issue