Database query representation impersonating file o

2019-04-10 21:14发布

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,

标签: http file dav
3条回答
来,给爷笑一个
2楼-- · 2019-04-10 21:59

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.
查看更多
欢心
3楼-- · 2019-04-10 22:08

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

查看更多
Summer. ? 凉城
4楼-- · 2019-04-10 22:12

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.

查看更多
登录 后发表回答