llvm-project/llvm/lib/Support/Windows
Zachary Turner 260bda3fbc [Support] Add llvm::sys::fs::remove_directories.
We already have a function create_directories() which can create
an entire tree, and remove() which can remove an empty directory,
but we do not have remove_directories() which can remove an entire
tree.  This patch adds such a function.

Because removing a directory tree can have dangerous consequences
when the tree contains a directory symlink, the patch here updates
the existing directory_iterator construct to optionally not follow
symlinks (previously it would always follow symlinks).  The delete
algorithm uses this flag so that for symlinks, only the links are
removed, and not the targets.

On Windows this is implemented with SHFileOperation, which also
does not recurse into symbolic links or junctions.

Differential Revision: https://reviews.llvm.org/D30676

llvm-svn: 297314
2017-03-08 22:49:32 +00:00
..
COM.inc Windows/COM.inc: Fix emacs mode in the first line. 2015-08-05 06:11:08 +00:00
DynamicLibrary.inc Cast to the right type on Windows. 2017-03-02 18:12:59 +00:00
Host.inc
Memory.inc Add Windows error code and tidy formatting for system errors. 2015-11-23 17:34:20 +00:00
Mutex.inc
Path.inc [Support] Add llvm::sys::fs::remove_directories. 2017-03-08 22:49:32 +00:00
Process.inc Remove TimeValue usage from llvm/Support 2016-10-24 10:59:17 +00:00
Program.inc [Clang/Support/Windows/Unix] Command lines created by clang may exceed the command length limit set by the OS 2016-01-05 19:56:12 +00:00
RWMutex.inc
Signals.inc Add missing includes on Windows. 2016-12-21 18:50:52 +00:00
ThreadLocal.inc
Threading.inc Fix C2712 build error on Windows 2017-03-07 20:09:46 +00:00
Watchdog.inc
WindowsSupport.h Removed FIXME from include ordering comment 2016-10-24 17:15:05 +00:00
explicit_symbols.inc