IasCdb.TextFileType
index
/home/fedora/IasRoot/lib/python3.12/site-packages/IasCdb/TextFileType.py

 
Modules
       
glob
os

 
Classes
       
builtins.object
TextFileType
enum.Enum(builtins.object)
FileType

 
class FileType(enum.Enum)
    FileType(*values)
 

 
 
Method resolution order:
FileType
enum.Enum
builtins.object

Data and other attributes defined here:
JSON = <FileType.JSON: 2>
YAML = <FileType.YAML: (1,)>

Data descriptors inherited from enum.Enum:
name
The name of the Enum member.
value
The value of the Enum member.

Static methods inherited from enum.EnumType:
__contains__(value)
Return True if `value` is in `cls`.
 
`value` is in `cls` if:
1) `value` is a member of `cls`, or
2) `value` is the value of one of the `cls`'s members.
__getitem__(name)
Return the member matching `name`.
__iter__()
Return members in definition order.
__len__()
Return the number of members (no aliases)

Readonly properties inherited from enum.EnumType:
__members__
Returns a mapping of member name->value.
 
This mapping lists all enum members, including aliases. Note that this
is a read-only view of the internal mapping.

 
class TextFileType(builtins.object)
     Class methods defined here:
from_file(file_name: str) -> Optional[IasCdb.TextFileType.FileType]
Get the type of the file from the extension of the passed file name
 
Args:
    file_name: the file name
Returns:
    The type of the file (belongs to FileType
    or None if the type has not been recognized
getExtension(file_type: IasCdb.TextFileType.FileType) -> str
get_cdb_type(folder: str) -> Optional[IasCdb.TextFileType.FileType]
Get the type of the CDB from the passed folder.
It checks the content of the CDB folder looking for a file named ias.ext
 
Args:
    folder: The parent folder of the CDB
Returns:
    the type of the text files in the CDB folder,
    or empty if cannot recognize the type of the CDB of the text files

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
SUPPORTED_TYPES = {<FileType.YAML: (1,)>: '.yaml', <FileType.JSON: 2>: '.json'}

 
Data
        Union = typing.Union