from_stream method

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream, password):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
password str The password to open the file.

from_stream

Detects file type by reading the file signature.

def from_stream(cls, stream, logger):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
logger ILogger The logger.

Returns: FileType: The detected file type, or FileType.unknown if detection fails.

from_stream

Detects the file type by reading the file signature.

def from_stream(cls, stream, password, logger):
    ...
Parameter Type Description
stream io.RawIOBase The file stream.
password str The password to open the file.
logger ILogger The logger.

Returns: FileType: The detected file type, or FileType.unknown if detection fails.

See Also