Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_filesystem_new ( CameraFilesystem **  fs  ) 

gp_filesystem_new: : a pointer to a CameraFilesystem

Creates a new empty CameraFilesystem

Return value: a gphoto2 error code.

Definition at line 483 of file gphoto2-filesys.c.

Referenced by gp_camera_new().

{
      int result;

      CHECK_NULL (fs);

      CHECK_MEM (*fs = malloc (sizeof (CameraFilesystem)));

      memset(*fs,0,sizeof(CameraFilesystem));

      result = append_folder (*fs, "/", NULL);
      if (result != GP_OK) {
            free (*fs);
            return (result);
      }

        return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index