“虚拟文件夹”在Linux中
我有一个网络服务,允许用户在服务器上上传并跟踪他们的文件。 我想做的是创建某种应用程序,在本地计算机上重新创建我的“在线文件系统”。有点像我的桌面上有一个文件夹,其中显示了我在网络服务器上的文件,我可以在其中移动它们、打开、保存等。如果您了解 Dropbox,您就会知道我想要完成什么。
我的问题是我不知道从哪里开始开发这个。我想我可以选择某种 Nautilus 扩展,但是这样我就会依赖于该文件管理器,所以我认为它应该是直接在操作系统文件系统中实现的东西。
我已经弄清楚如何在 Windows 上执行此操作(http://msdn. microsoft.com/en-us/magazine/cc188741.aspx),看起来非常简单。
所以我想知道这里是否有人有在 Linux 上执行此操作的经验以及最好的方法是什么。
谢谢。
I have a web service which allows the users to upload and keep track of their files on the server.
What I want to do is create some sort of application which recreates my "online file system" on the local machine. Kind of like having a folder on my desktop which presents the files I have on the webserver, where I can move them, open, save, etc. If you know Dropbox you get the idea of what I want to accomplish.
My problem is that I have no clue on where to start to develop this. I guess I could go for some sort of Nautilus extension, but then I would be dependent of that file manager so I think it should be something implemented directly in the OS' filesystem.
I have already figured out how to do this on Windows (http://msdn.microsoft.com/en-us/magazine/cc188741.aspx) and it seems pretty straight forward.
So what I want to know is if anyone here has experience in doing this on Linux and whats the best way to do it.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您可以使用fuse制作虚拟文件系统:wikipedia,sourceforge。这是一个 教程 和另一个 python
它模拟驱动器,因此它可以在 shell 或 nautilus 或其他任何东西中工作。
还有一个 Mac 端口,因此它也可以在那里工作。
You can use use fuse to make a virtual file system: wikipedia, sourceforge. Here's a tutorial and another for python
It emulates a drive so it will work in the shell or nautilus or anything else.
There is also a Mac port so it could work there too.
如果你想自己开发这个,请使用fuse
http://fuse.sourceforge.net/
但是如果我在你身边,我会首先尝试使用保险丝搜索现有的解决方案,具体取决于你的服务器的功能。
HIH
If you want to develop this by yourself, use fuse
http://fuse.sourceforge.net/
But if I were in you, I would try first in searching an already existing solution with fuse, depending on the capabilities of your server.
HIH
正如其他人已经建议的那样,您应该能够使用 Fuse。
您不指定 Web 服务的工作方式,但如果它是基于 WebDAV 的(这对于此类应用程序有意义),那么您可以使用 WebDAV 的现有 Fuse 模块,例如 davfs2。
As others have already suggested, you should be able to use Fuse.
You don't specify how your web service works, but if it's WebDAV-based (which would make sense for this type of application), then you could use existing Fuse modules for WebDAV such as davfs2.
在您继续创建自己的另一个网络文件系统之前,我建议您查看已有的内容。
首先想到的是ssh/scp/sftp。在现代 UNIX(BSD、Solaris、Linux、MacOSX 等)上,ssh 守护进程默认是预安装的。您只需要编写脚本来管理 Web 应用程序中的用户帐户。
如果它必须是基于网络的东西,那么看看 WebDAV。您可以使用大多数 Web 服务器运行 WebDAV。 Linux 上已经有一个 WebDAV 文件系统,看起来它甚至内置于 Windows XP 及更高版本中: winnt webdav 网络驱动器。
Box.net 就是使用 WebDAV 的此类服务之一。
Before you go ahead and create you own yet-another-network-filesystem I would recommend you look at what's already out there.
The first thing that comes to mind is ssh/scp/sftp. On modern unix (BSD, Solaris, Linux, MacOSX etc) the ssh daemon comes pre-installed by default. You just need to write scripts to manage user accounts from your web application.
If it HAS to be a web based thing then look at WebDAV. You can run WebDAV using most web servers. There is already a WebDAV filesystem on Linux and it looks like it is even built-in to Windows XP and above: winnt webdav network drive.
Box.net is one such service using WebDAV.
查看 http://www.dropbox.com/
Check out http://www.dropbox.com/