Dokan

user mode file system for windows    >>Japanese version

Dokan Ruby 0.1.4 released

December 13th, 2007 in Dokan, Ruby

Now I released Dokan Ruby 0.1.4.

Dokan Ruby is a Ruby extension library to write a file system for Windows. This extension also has compatible API with FuseFS (Ruby extension for FUSE). You can write a file system only in 25 lines.

require 'dokanfs'
class Hello
  def initialize
   @msg = "hello, world"
  end
  def contents path
    ["hello.txt"]
  end
  def file? path
    path  =~ /hello.txt/
  end
  def directory? path
    path == "/"
  end
  def read_file path
    @msg
  end
  def size path
    @msg.length
  end
end
FuseFS.set_root(Hello.new)
FuseFS.mount_under("r")
FuseFS.run

6 Responses to “Dokan Ruby 0.1.4 released”

  • Valentin Alexeev
    January 5th, 2008 at 6:06 am

    Is your version of FuseFS compatible with the one working with FUSE?

    Meaning - if there is a file system implemented in ruby over FuseFS how hard it will be to port it over to your Dokan Ruby bindings?

  • Hiroki
    January 8th, 2008 at 4:24 pm

    > Is your version of FuseFS compatible with the one working with FUSE?
    DokanFS has the same API with FuseFS so your program should work both on Dokan and Fuse.

    Windows Explorer always accesses non-exsinting files and reads directorys recurcively. You should consider explorer’s bad behaviors.

  • Greg Millam
    May 14th, 2008 at 2:20 pm

    Hi Hiroki -

    Would you allow me to include your Dokan Ruby code in the FuseFS distribution? (With full crediting, of course.) I’d like to release a version that works on all four major platforms (BSD, OS X, Linux, Windows). With Dokan, it’d basically be a copy of most of your lower level code, and higher level (editors, etc) handling hooking into either Dokan or FUSE, as appropriate.

    Please let me know.

    Thanks!

    - Greg

  • Hiroki
    May 15th, 2008 at 2:38 pm

    Hello, Greg

    Since Dokan Ruby is released under MIT license, you can freely use it. However Dokan library itself does not allow to redistribute now. In the early feature, I think it will be next week hopefully, I’ll change the license of Dokan library. Please recheck then.

    Thanks

  • Greg Millam
    May 22nd, 2008 at 1:44 am

    Hi Hiroki -

    Thanks!

    Also - I’ve just read your comment on the Dokan Library 0.2.6 release - Do you have any timeline on how long until you get the FUSE compatible API out? If it’s not too long, I can just use that?

  • Bas
    November 15th, 2008 at 7:53 pm

    Wow, this is really great. After having searched for a windows fuse version for quite a while this Dokan lib with ruby bindings is godlike!

Leave a Reply

*
To prove that you're not a bot, enter this code
Anti-Spam Image