UnionFS-like filesystem for windows
I'm looking for something that works like UnionFS in Windows 7. My usecase: having clean code working directory in a read-only directory, and compiling it in a union filesystem which would store compiled binaries logically in the same place, but physically in different directory.
Libraries do not work this way, even though they were accepted as an answer in UnionFS alike on windows, Virtually merge folders -- they only show top-level directories in one place.
The code itself is huge (2GB of data), and I'd like to avoid copying it for every build in my build server.
Solution 1:
You can make a poor-man's unionfs with symbolic links: reproduce the directory structure of the source, but make links (symbolic or hard) for the files. This should be suitable for your purpose as long as the build system doesn't try to modify source files.
With GNU cp, it's as easy as cp -al
or cp -as
. But I don't know if there is a port of GNU tools that understands Windows links.
If you need to call the mklink command, it can be done with POSIX tools (warning, typed directly into the browser):
cd SOURCE
find -type d -exec sh -c 'cd BUILDDIR && mkdir "$@"' _ {} +
find -type f -exec sh -c 'mklink "$1" "BUILDDIR/$1"' _ {} \;
I suppose there is a native Windows way involving Powershell, but I have no idea what it looks like. It might be worth investigating if your directory tree is large and your disks are fast because forking under Windows tends to be slow, and the commands above need to fork a lot.
Solution 2:
Could you use symbolic links to fake this? http://en.wikipedia.org/wiki/NTFS_symbolic_link It's not answering the exact question but I think it will solve the use case you've given.
Solution 3:
I found this, but I don't really know how well it works:
- winunionfs