user: Give a detailed overview of CompositorNodeOutputFile(CompositorNode): syntax, arguments, return values, common patterns.

assistant: # CompositorNodeOutputFile(CompositorNode)

base classes — [`bpy_struct`](bpy.types.bpy_struct.html#bpy.types.bpy_struct "bpy.types.bpy_struct"), [`Node`](bpy.types.Node.html#bpy.types.Node "bpy.types.Node"), [`NodeInternal`](bpy.types.NodeInternal.html#bpy.types.NodeInternal "bpy.types.NodeInternal"), [`CompositorNode`](bpy.types.CompositorNode.html#bpy.types.CompositorNode "bpy.types.CompositorNode")

*class* bpy.types.CompositorNodeOutputFile(*CompositorNode*)
:   Write image file to disk

    active_item_index
    :   Index of the active item

        Type:
        :   int in [0, inf], default 0

    directory
    :   The directory where the image will be written

        Type:
        :   string, default “”, (never None, blend relative `//` prefix supported, Supports [template expressions](https://docs.blender.org/manual/en/5.0/files/file_paths.html#path-templates))

    file_name
    :   The base name of the file. Other information might be included in the final file name depending on the node options

        Type:
        :   string, default “”, (never None, Supports [template expressions](https://docs.blender.org/manual/en/5.0/files/file_paths.html#path-templates))

    file_output_items
    :   Type:
        :   [`NodeCompositorFileOutputItems`](bpy.types.NodeCompositorFileOutputItems.html#bpy.types.NodeCompositorFileOutputItems "bpy.types.NodeCompositorFileOutputItems") [`bpy_prop_collection`](bpy.types.bpy_prop_collection.html#bpy.types.bpy_prop_collection "bpy.types.bpy_prop_collection") of [`NodeCompositorFileOutputItem`](bpy.types.NodeCompositorFileOutputItem.html#bpy.types.NodeCompositorFileOutputItem "bpy.types.NodeCompositorFileOutputItem"), (readonly)

    format
    :   Type:
        :   [`ImageFormatSettings`](bpy.types.ImageFormatSettings.html#bpy.types.ImageFormatSettings "bpy.types.ImageFormatSettings"), (readonly)

    save_as_render
    :   Apply render part of display transform when saving byte image

        Type:
        :   boolean, default False

    *classmethod* is_registered_node_type()
    :   True if a registered node type

        Returns:
        :   Result

        Return type:
        :   boolean

    *classmethod* input_template(*index*)
    :   Input socket template

        Parameters:
        :   **index** (*int in* *[**0**,* *inf**]*) – Index

        Returns:
        :   result

        Return type:
        :   [`NodeInternalSocketTemplate`](bpy.types.NodeInternalSocketTemplate.html#bpy.types.NodeInternalSocketTemplate "bpy.types.NodeInternalSocketTemplate")

    *classmethod* output_template(*index*)
    :   Output socket template

        Parameters:
        :   **index** (*int in* *[**0**,* *inf**]*) – Index

        Returns:
        :   result

        Return type:
        :   [`NodeInternalSocketTemplate`](bpy.types.NodeInternalSocketTemplate.html#bpy.types.NodeInternalSocketTemplate "bpy.types.NodeInternalSocketTemplate")

    update()

    *classmethod* bl_rna_get_subclass(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The RNA type or default when not found.

        Return type:
        :   [`bpy.types.Struct`](bpy.types.Struct.html#bpy.types.Struct "bpy.types.Struct") subclass

    *classmethod* bl_rna_get_subclass_py(*id*, *default=None*, */*)
    :   Parameters:
        :   **id** (*str*) – The RNA type identifier.

        Returns:
        :   The class or default when not found.

        Return type:
        :   type