[NEW] Base class for drives
This commit is contained in:
3
utils/globals.py
Normal file
3
utils/globals.py
Normal file
@@ -0,0 +1,3 @@
|
||||
import platform
|
||||
|
||||
OS_TYPE = platform.system()
|
||||
27
utils/utils_drive.py
Normal file
27
utils/utils_drive.py
Normal file
@@ -0,0 +1,27 @@
|
||||
from utils.globals import OS_TYPE
|
||||
|
||||
class Drive():
|
||||
|
||||
path: str
|
||||
|
||||
total_sectors: str
|
||||
|
||||
disk_type = None
|
||||
|
||||
name: str
|
||||
|
||||
block_size: int = 512
|
||||
|
||||
capacity: int
|
||||
|
||||
def __init__(self, name , path, disk_type, block_size, capacity):
|
||||
self.name = name
|
||||
self.disk_type = disk_type
|
||||
self.path = path
|
||||
if block_size is not None:
|
||||
self.block_size = block_size
|
||||
self.capacity = capacity
|
||||
|
||||
def erase(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user