From 753cbbbd3ce28253f381caff83ce2a7f6e08785b Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Mon, 6 Dec 2010 04:28:42 +0000 Subject: Support/FileSystem: Add directory_iterator implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/PathV2.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/Support/PathV2.cpp') diff --git a/lib/Support/PathV2.cpp b/lib/Support/PathV2.cpp index 73896edecc..639b323a82 100644 --- a/lib/Support/PathV2.cpp +++ b/lib/Support/PathV2.cpp @@ -688,6 +688,16 @@ error_code create_directories(const Twine &path, bool &existed) { return create_directory(p, existed); } +void directory_entry::replace_filename(const Twine &filename, file_status st, + file_status symlink_st) { + SmallString<128> path(Path.begin(), Path.end()); + path::remove_filename(path); + path::append(path, filename); + Path = path.str(); + Status = st; + SymlinkStatus = symlink_st; +} + } // end namespace fs } // end namespace sys } // end namespace llvm -- cgit v1.2.3