Question

Is there any way to have something that looks just like a file on a Windows file share but is really a resource served up over HTTP?

For context, I'm working with an old app that can only deal with files on a Windows file share, I want to create a simple HTTP-based service to serve the content of the files dynamically to pick up real time changes to the underlying data on request


Thanks for the tips - I've got some research to do now...

Thanks all,

Was it helpful?

Solution

WebDAV (basically) takes an existing directory, and shares it over HTTP - which sounds like the opposite of what you want.

You need something that speaks SMB/CIFS on one end, and your own code on the other. The easiest way to do that is with a userspace file system.

To that end, here's a couple of links:

  1. WinFUSE, which is kind of a barebones CIFS/SMB server that can host your own filesystem. I've done a couple of small samples with it - and the docs are terrible, but it more or less worked.
  2. Dokan, a userspace file driver with .NET bindings. I haven't used this one, but it looks promising. It has both .NET and Ruby bindings, so you should be able to get a POC up pretty quickly.
  3. Callback File System - yet another userspace file system. Again, I have no experience with this one.
  4. A Linux box with SAMBA and FUSE that shares the drive out to the Windows box.

OTHER TIPS

This won't answer your question in any meaningful way, but maybe it will get you pointed in the right direction. Look into serving the "file(s)" via WebDAV--SharePoint uses this and its files can be accessed exactly as you want, as a file share where the transport mechanism is HTTP. Unfortunately I can't give any more detailed info, as I've only worked on the client end of WebDAV and not the server side of things.

I think serving up files from WebDAV might be what you're looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top