Island: Add get_file_contents() to file utils

This commit is contained in:
Shreya Malviya 2022-08-02 18:09:50 +05:30
parent dc4749da63
commit cb79708fda
1 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,12 @@ if is_windows_os():
import monkey_island.cc.server_utils.windows_permissions as windows_permissions
def get_file_contents(file_path: Path) -> str:
with open(file_path, "rt") as f:
file_contents = f.read()
return file_contents
def create_secure_directory(path: Path):
if not path.is_dir():
if is_windows_os():