27 lines
492 B
Python
27 lines
492 B
Python
|
"""Abstract Operating System."""
|
||
|
|
||
|
from abc import ABC, abstractmethod
|
||
|
from pathlib import Path
|
||
|
|
||
|
from rwx import Object
|
||
|
|
||
|
|
||
|
class OS(Object, ABC):
|
||
|
"""Operating System."""
|
||
|
|
||
|
def __init__(self, path: Path) -> None:
|
||
|
"""Set root.
|
||
|
|
||
|
:param path: root directory
|
||
|
:type path: Path
|
||
|
"""
|
||
|
self.root = path
|
||
|
self.name = self.get_name()
|
||
|
|
||
|
@abstractmethod
|
||
|
def get_name(self) -> str:
|
||
|
"""Return mandatory name.
|
||
|
|
||
|
:rtype: str
|
||
|
"""
|