file - 将目录组合成一个虚拟目录

标签 file directory virtual

在 Windows XP 中
有人知道将多个目录映射到一个虚拟驱动器或目录的软件吗?

当我打开虚拟目录时,我想查看映射目录中的所有文件,就好像它是一个物理目录一样。

Linux 软件 mhddfs 似乎完全符合我的需要。

来自 http://svn.uvw.ru/mhddfs/trunk/README

Consider we have two hard drives with the content below:

/hdd1             /hdd2
|                 |
+-- /dir1         +-- /dir1
|   |             |   |
|   +- file2      |   +- file4
|                 |   +- file2
+-- file1         |
|                 +-- file5
+-- /dir2         |
    |             +-- /dir3
    +- file3          |
                      +- file6

mounting this tree with the command:

mhddfs /hdd1,/hdd2 /hdd_common

into the specified file system point we will see a combined tree.

In the united tree we can see all the directories and files. Note
file2 of 2nd hdd is not visible (because 1st hdd  has  the  file2
already).

/hdd_common
|
+-- /dir1
|   |
|   +-- file2  -> /hdd1/dir1/file2
|   +-- file4
|
|-- /dir2
|   |
|   + file3
|
+-- /dir3
|   |
|   +-- file6
|
+-- file1
+-- file5

谢谢

最佳答案

这不是您想要的解决方案,但如果您可以忍受所有源目录在新目标中都有自己的子目录,您可以查看 Windows 工具 junction来自 Sysinternals 套件。

它允许您创建和管理符号链接(symbolic link)。您的树结构将类似于:

E:\hdd_common
├───hdd1
│   └───some folder structure [...]
└───hdd2
    └───some other folder structure [...]

像这样称呼它:
junction "e:\hdd_common\hdd1" "f:\"
junction "e:\hdd_common\hdd2" "g:\"

关于file - 将目录组合成一个虚拟目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1487775/

相关文章:

java - 逐字符读取文件并在其中找到输入字符串

file - 如何找到某些指定文件的大小?

Ruby,使用数组写入 YAML 文件

.net - 如何获取属性覆盖属性?

.net - 如何使用 FileStream 读取超过 2 GB 的大文件

php - is_dir 不识别目录。为什么?

c++ - 将目录从编译器传递到 C++ 应用程序

batch-file - 如何从单个bat文件中删除多个未知文件夹中的文件?

java - 处理开启虚拟串口

当派生类是最终的时,C++ 虚函数内联?