.. index:: 
  !DetectedFace.toFile Method
  
.. _id3_face_detected_face_to_file_class_method:

===============================================================================
DetectedFace.toFile Method
===============================================================================

Module: :ref:`DetectedFace<id3_face_detected_face_class>`

Definition
----------

Saves the face object to a file.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        to_file(self, path: str) -> None

      **Parameters**

        .. line-block::

          ``path`` str
          :guilabel:`in` Path to the file to export the face object to.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        void toFile(String? path)

      **Parameters**

        .. line-block::

          ``path`` String
          :guilabel:`in` Path to the file to export the face object to.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public void ToFile(string path)

      **Parameters**

        .. line-block::

          ``path`` string
          :guilabel:`in` Path to the file to export the face object to.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public void toFile(String path) throws FaceException

      **Parameters**

        .. line-block::

          ``path`` String
          :guilabel:`in` Path to the file to export the face object to.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func toFile(path: String) throws

      **Parameters**

        .. line-block::

          ``path`` String
          :guilabel:`in` Path to the file to export the face object to.


      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DetectedFace_ToFile (
            ID3_DETECTED_FACE hDetectedFace, 
            const char * path)

      **Parameters**

        .. line-block::

          ``hDetectedFace`` :ref:`ID3_DETECTED_FACE<id3_face_detected_face_class>`
          :guilabel:`in` Handle to the DetectedFace object.

          ``path`` const char *
          :guilabel:`in` Path to the file to export the face object to.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3FaceError<id3_face_face_error_enum>` file for the list of possible error codes.


