Support/FileSystem: Add directory_iterator implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer
2010-12-06 04:28:42 +00:00
parent f150e7695e
commit 753cbbbd3c
5 changed files with 152 additions and 13 deletions
+10
View File
@@ -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