ooodev.adapter.io.temp_file_comp module

class ooodev.adapter.io.temp_file_comp.TempFileComp(component)[source]

Bases: ComponentProp, TempFilePartial

Class for managing Pipe Component.

Parameters:

component (XTempFile) –

__init__(component)[source]

Constructor

Parameters:

component (XTempFile) – UNO Component that supports com.sun.star.io.TempFile service.

Return type:

None

static context_manager()[source]

Context manager for managing TempFileComp.

Returns:

Context instance.

Return type:

_TempFileContextManager

Example

with TempFileComp.context_manager() as tmp:
    print(tmp.resource_name)
    print(tmp.uri)
classmethod from_lo(lo_inst=None)[source]

Creates an instance from the Lo.

Creates a new temp file in the LibreOffice Temp directory. resource_name something like '/tmp/lu23986334kdxgl.tmp/lu23986334kdxhw.tmp'. uri something like 'file:///tmp/lu23986334kdxgl.tmp/lu23986334kdxhw.tmp'.

Parameters:

lo_inst (LoInst, optional) – LoInst, Defaults to Lo.current_lo.

Returns:

The instance.

Return type:

TempFileComp