FileHandler module
- exception FileHandler.BadFilePathException[source]
Bases:
FileHandlerErrorRaised when the file path has a wrong format
- exception FileHandler.DirectoryLockedException[source]
Bases:
FileHandlerErrorRaised when the FileHandler does not have access to a directory specified in the file path. Normally this is due to permission errors
- class FileHandler.FileHandler(file_path: str, file_mode: FileMode = FileMode.READWRITEBYTES, create: bool = False)[source]
Bases:
object
- exception FileHandler.FileLockedException[source]
Bases:
FileHandlerErrorRaised when the FileHandler can not open the file for some reason, mostly due to permission errors or the file being in use
- class FileHandler.FileMode(value)[source]
Bases:
EnumAn enumeration.
- APPENDANDREAD = 'a+'
- APPENDBYTES = 'ab'
- APPENDONLY = 'a'
- APPENDREADBYTES = 'a+b'
- READBYTES = 'rb'
- READONLY = 'r'
- READWRITE = 'r+'
- READWRITEBYTES = 'r+b'
- WRITEBYTES = 'wb'
- WRITEONLY = 'w'
- WRITEREAD = 'w+'
- WRITEREADBYTES = 'w+b'
- exception FileHandler.FileNotFoundException[source]
Bases:
FileHandlerErrorRaised when the file does not exists
- exception FileHandler.NotAFileException[source]
Bases:
FileHandlerErrorRaised when attempting to open something that is not a file