telzine/dialazine/lib/text_screen_reader.py
Tyrel Souza 5c2d5626d0
init
2023-07-29 23:26:31 -04:00

14 lines
455 B
Python

import os
class TextScreenReader:
def __init__(self, root_directory):
self.root_directory = root_directory
def read_file_name(self, path):
full_path = "%s/%s" % (self.root_directory, path)
with open(full_path, 'r') as f:
full_file = f.readlines()
f.close()
return full_file
def does_file_exist(self, file_path):
return os.path.exists("%s/%s" % (self.root_directory, file_path))