-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.py
More file actions
41 lines (31 loc) · 1.12 KB
/
interface.py
File metadata and controls
41 lines (31 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
from abc import ABC, abstractmethod
from typing import Optional
class IFileInfoExtractor(ABC):
"""
Declares all commands that are directly connected to the file.
Accepts only file absolute path.
"""
@abstractmethod
def get_dir(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_dir_without_trailing_slash(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_drive_letter(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_file_ext(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_file_name(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_file_name_without_ext(self, file_path_abs: str) -> str:
raise NotImplementedError
@abstractmethod
def get_file_type(self, file_path_abs: str) -> Optional[str]:
raise NotImplementedError
@abstractmethod
def get_shebang(self, file_path_abs: str) -> Optional[str]:
raise NotImplementedError