20

I have a directory containing source code, which I compile to produce object files. I want to quickly apply a patch and rebuild in such a way that I have simultaneous access to both the old and new object files. One way to do that is:

cd old && make
xcopy old new
cd new && apply diff && make

However, the copy takes about 10 minutes, even on the same drive. If I could make new be a copy-on-write version of old that would be much faster. Can Windows 7 NTFS create copy-on-write directories? Can these directories be expanded to copy-on-write subdirectories when the outer directory is modified?

Neil Mitchell
  • 9,090
  • 1
  • 27
  • 85
  • 2
    No, NTFS does not have copy-on-write support. – Harry Johnston Mar 03 '15 at 03:29
  • 2
    @HarryJohnston, the Volume Shadow copy service apparently does use copy-on-write to do its magic, but perhaps that's internal only? – Neil Mitchell Mar 03 '15 at 07:39
  • That affects the entire volume, rather than specific files or directories, and I believe it is implemented at the block level. I suppose it might still work, depending on your exact needs. – Harry Johnston Mar 03 '15 at 08:04

1 Answers1

1

If you create a VHD and mount that in that directory, you can independently configure VSS on that volume and therefore on that directory.

Serge Fonville
  • 304
  • 2
  • 4