arch-image-builder/builder/disk/layout/area.py
BigfootACA e6c6ab6bf7 Initial commit
Signed-off-by: BigfootACA <bigfoot@classfun.cn>
2024-05-17 23:04:34 +08:00

28 lines
512 B
Python

from builder.lib.area import Area, Areas
class DiskArea:
def find_free_area(
self,
start: int = -1,
end: int = -1,
size: int = -1,
area: Area = None,
biggest: bool = True,
) -> Area:
return self.get_free_areas().find(
start, end, size, area, biggest
)
def get_free_size(self) -> int:
return sum(area.size for area in self.get_free_areas())
def get_usable_area(self) -> Area:
pass
def get_used_areas(self, table=False) -> Areas:
pass
def get_free_areas(self) -> Areas:
pass