{"id":24,"date":"2005-12-28T02:50:31","date_gmt":"2005-12-28T09:50:31","guid":{"rendered":"http:\/\/intr.overt.org\/blog\/?p=24"},"modified":"2005-12-28T02:50:31","modified_gmt":"2005-12-28T09:50:31","slug":"libgphoto2-based-fuse-filesystem","status":"publish","type":"post","link":"https:\/\/blog.intr.overt.org\/?p=24","title":{"rendered":"libgphoto2 based FUSE filesystem"},"content":{"rendered":"<p>Merry Christmas, Happy New Year, etc, etc.<\/p>\n<p>I&#8217;m currently in Singapore visiting my family for the holidays and I finally caved in and bought myself a digital camera, which happens to be a Canon Ixus 55. It&#8217;s all nice and shiny but it doesn&#8217;t support the USB Mass Storage class, which means I need to use libgphoto2 based tools to interact with it. So, I thought to myself that there ought to be a FUSE filesystem based on libgphoto2 that handles this. And, in fact,  Christopher Lester wrote <a href=\"http:\/\/www.hep.phy.cam.ac.uk\/~lester\/gphoto2-fuse-fs\/\">one.<\/a> But it doesn&#8217;t use libgphoto2 directly, and instead interacts with the gphoto2 command line tool which makes it a bit clunky. As Christopher has no plans to change this, I decided to write a filesystem that did use the library, and I now have a happy 0.0 release <a href=\"http:\/\/intr.overt.org\/gphoto-fuse\">here.<\/a><\/p>\n<p>As you might imagine, it&#8217;s very basic at the moment, but allows you to retrieve and delete files which is the majority of most people&#8217;s interactions with a camera. Deletion is very slow for reasons I don&#8217;t currently understand, but it does work.<\/p>\n<p>The implementation is rather interesting because the libgphoto2 (cameras in general?) model doesn&#8217;t map to filesystem operations terribly well, particularly in the separation of file and directory iteration and the all-or-nothing approach to file access, which should make implementing writing files to a camera rather interesting. As a result, anyone looking at this code will probably be entertained.<\/p>\n<p>And yes, if you read hub&#8217;s <a href=\"http:\/\/www.figuiere.net\/hub\/blog\/?2005\/12\/26\/345-boxing-day-sales-libgphoto2-2199\">announcement<\/a> of the latest libgphoto2 release, you may have noticed that it now exposes mounted Mass Storage class devices. While you could then turn around and mount those using gphoto-fuse, I probably wouldn&#8217;t recommend it. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally caved in and bought myself a digital camera, which happens to be a Canon Ixus 55. It&#8217;s all nice and shiny but it doesn&#8217;t support the USB Mass Storage class, which means I need to use libgphoto2 based tools to interact with it. So&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-rambling","category-the-wonderful-world-of-gnome"],"_links":{"self":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/24"}],"collection":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":0,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.intr.overt.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}