Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_filesystem_reset ( CameraFilesystem fs  ) 

Clear the filesystem.

fs the filesystem to be cleared
Resets the filesystem. All cached information including the folder tree will get lost and will be queried again on demand.

a gphoto2 error code.

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

References gp_log(), GP_LOG_DEBUG, GP_LOG_ERROR, GP_OK, and _CameraFilesystem::rootfolder.

Referenced by gp_camera_exit(), and gp_filesystem_free().

      gp_log (GP_LOG_DEBUG, "gphoto2-filesystem", "resetting filesystem");
      CR (gp_filesystem_lru_clear (fs));
      CR (delete_all_folders (fs, "/", NULL));
      if (fs->rootfolder) {
            fs->rootfolder->files_dirty = 1;
            fs->rootfolder->folders_dirty = 1;
      } else {
            gp_log (GP_LOG_ERROR,"gphoto2-filesys", "root folder is gone?");
      return (GP_OK);

Generated by  Doxygen 1.6.0   Back to index