aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/cpp/util/file_windows.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/cpp/util/file_windows.cc')
-rw-r--r--src/main/cpp/util/file_windows.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/cpp/util/file_windows.cc b/src/main/cpp/util/file_windows.cc
index 3a5b5ac8e4..ba3e777d2b 100644
--- a/src/main/cpp/util/file_windows.cc
+++ b/src/main/cpp/util/file_windows.cc
@@ -43,6 +43,12 @@ static unique_ptr<WCHAR[]> GetCwdW();
// necessary.
static bool IsDirectoryW(const wstring& path);
+// Returns true the file or junction at `path` is successfully deleted.
+// Returns false otherwise, or if `path` doesn't exist or is a directory.
+// `path` must be a normalized Windows path, with UNC prefix (and absolute) if
+// necessary.
+static bool UnlinkPathW(const wstring& path);
+
// Like `AsWindowsPath` but the result is absolute and has UNC prefix if needed.
static bool AsWindowsPathWithUncPrefix(const string& path, wstring* wpath);