telzine/dialazine/lib/text_screen_reader.py

14 lines
455 B
Python
Raw Normal View History

2023-07-30 03:26:31 +00:00
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))