import os
from pathlib import Path
from typing import Union
class FileIO:
	def __init__(B,path):
		A=path
		if isinstance(A,str):A=Path(A)
		B.path=A
	def read(A):
		with open(A.path,'rb')as B:return B.read()
	def get_last_modified(A):
		"\n        Returns float - timestamp or None, if path doesn't exist.\n        "
		try:return os.path.getmtime(A.path)
		except FileNotFoundError:return
	def __repr__(A):return'%s(%s)'%(A.__class__.__name__,A.path)
class KnownContentFileIO(FileIO):
	def __init__(A,path,content):super().__init__(path);A._content=content
	def read(A):return A._content