diff --git a/opt/ahenk/base/util/util.py b/opt/ahenk/base/util/util.py index 364f3a3..c24d732 100644 --- a/opt/ahenk/base/util/util.py +++ b/opt/ahenk/base/util/util.py @@ -95,6 +95,15 @@ class Util: finally: return content + @staticmethod + def read_file_by_line(full_path, mode='r'): + line_list = list() + with open(full_path, mode) as f: + lines = f.readlines() + for line in lines: + line_list.append(line) + return line_list + @staticmethod def write_file(full_path, content, mode='w+'): file = None