diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:42 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-12-06 04:28:42 +0000 |
commit | 753cbbbd3ce28253f381caff83ce2a7f6e08785b (patch) | |
tree | 2cd99ba29bce96f8f3db9d4e4ef781c959c68679 /lib/Support/PathV2.cpp | |
parent | f150e7695e32d42856d86499fcde970825371637 (diff) |
Support/FileSystem: Add directory_iterator implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PathV2.cpp')
-rw-r--r-- | lib/Support/PathV2.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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 |