Creates a reparse point from |source| (an empty directory) to |target|.
| 129 | public: |
| 130 | // Creates a reparse point from |source| (an empty directory) to |target|. |
| 131 | ReparsePoint(const FilePath& source, const FilePath& target) { |
| 132 | dir_.Set( |
| 133 | ::CreateFile(source.value().c_str(), |
| 134 | FILE_ALL_ACCESS, |
| 135 | FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, |
| 136 | NULL, |
| 137 | OPEN_EXISTING, |
| 138 | FILE_FLAG_BACKUP_SEMANTICS, // Needed to open a directory. |
| 139 | NULL)); |
| 140 | created_ = dir_.IsValid() && SetReparsePoint(dir_, target); |
| 141 | } |
| 142 | |
| 143 | ~ReparsePoint() { |
| 144 | if (created_) |
nothing calls this directly
no test coverage detected