diff --git a/ofrak_core/ofrak/resource.py b/ofrak_core/ofrak/resource.py index eb44e7eba..8e3a7759f 100644 --- a/ofrak_core/ofrak/resource.py +++ b/ofrak_core/ofrak/resource.py @@ -22,6 +22,8 @@ overload, ) from contextlib import asynccontextmanager +from warnings import warn + import tempfile312 as tempfile from ofrak.component.interface import ComponentInterface @@ -1451,6 +1453,13 @@ async def flush_data_to_disk(self, path: str, pack: bool = True): with open(path, "wb") as f: pass + async def flush_to_disk(self, path: str, pack: bool = True): # pragma: no cover + warn( + "Resource.flush_to_disk is deprecated! Use Resource.flush_data_to_disk instead.", + category=DeprecationWarning, + ) + return await self.flush_data_to_disk(path, pack) + def __repr__(self): properties = [ f"resource_id={self._resource.id.hex()}",