Correction to file remove utility

[ Merge of http://go/wvgerrit/84989 ]

FileUtils::Remove() when used with wildcards would ignore a prefix specified
before the asterisk and delete all files with the same extension.

Fix proposed by broadcom.

Bug: 120039689
Test: WV unit/integration tests
Change-Id: Iddc6c6b1983c41b501b21f34626f56c0b74af6c8
This commit is contained in:
Rahul Frias
2019-08-22 15:17:25 -07:00
parent 4e2c4d14fe
commit e884b06e54
3 changed files with 176 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ bool IsCurrentOrParentDirectory(char* dir);
class FileUtils {
public:
static bool Exists(const std::string& src);
// The caller may only specifying a single wildcard
static bool Remove(const std::string& src);
static bool Copy(const std::string& src, const std::string& dest);
static bool List(const std::string& path, std::vector<std::string>* files);