IasCdb.TextFileType
index
/home/ubuntu/IasRoot/lib/python3.10/site-packages/IasCdb/TextFileType.py

 
Modules
       
glob
os

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

 
class FileType(enum.Enum)
    FileType(value, names=None, *, module=None, qualname=None, type=None, start=1)
 
An enumeration.
 
 
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.

Readonly properties inherited from enum.EnumMeta:
__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] from builtins.type
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 from builtins.type
get_cdb_type(folder: str) -> Optional[IasCdb.TextFileType.FileType] from builtins.type
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 (if defined)
__weakref__
list of weak references to the object (if defined)

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

 
Data
        Union = typing.Union