Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_file_free ( CameraFile file  ) 

descruct a CameraFile object.

Parameters:
file a CameraFile
Returns:
a gphoto2 error code.

Definition at line 130 of file gphoto2-file.c.

References CHECK_NULL, CHECK_RESULT, GP_FILE_ACCESSTYPE_FD, gp_file_clean(), and GP_OK.

Referenced by gp_file_unref().

{
      CHECK_NULL (file);

      CHECK_RESULT (gp_file_clean (file));
      
      if (file->accesstype == GP_FILE_ACCESSTYPE_FD)
            close (file->fd);

      free (file);
      return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index