Removing, opening and creating files in platform_file and file

BUG=
R=perkj@webrtc.org, sprang@google.com

Review URL: https://codereview.webrtc.org/2347473003 .

Cr-Commit-Position: refs/heads/master@{#14250}
This commit is contained in:
Viktor Palmkvist
2016-09-16 10:19:23 +02:00
parent 280ad1514e
commit 971eb27e54
7 changed files with 58 additions and 26 deletions

View File

@ -19,13 +19,6 @@
namespace rtc {
File File::Open(const std::string& path) {
HANDLE handle =
::CreateFile(ToUtf16(path).c_str(), GENERIC_READ | GENERIC_WRITE, 0,
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
return File(handle);
}
size_t File::Write(const uint8_t* data, size_t length) {
RTC_DCHECK_LT(length, std::numeric_limits<DWORD>::max());
size_t total_written = 0;