Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(679)

Side by Side Diff: webrtc/base/win32filesystem.cc

Issue 2935933007: Delete class DirectoryIterator and FileRotatingStream read support. (Closed)
Patch Set: Drop an RTC_NOTREACHED. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return false; 59 return false;
60 } 60 }
61 } 61 }
62 62
63 return (::CreateDirectory(path16.c_str(), nullptr) != 0); 63 return (::CreateDirectory(path16.c_str(), nullptr) != 0);
64 } 64 }
65 65
66 bool Win32Filesystem::DeleteFile(const Pathname &filename) { 66 bool Win32Filesystem::DeleteFile(const Pathname &filename) {
67 LOG(LS_INFO) << "Deleting file " << filename.pathname(); 67 LOG(LS_INFO) << "Deleting file " << filename.pathname();
68 if (!IsFile(filename)) { 68 if (!IsFile(filename)) {
69 RTC_DCHECK(IsFile(filename));
70 return false; 69 return false;
71 } 70 }
72 return ::DeleteFile(ToUtf16(filename.pathname()).c_str()) != 0; 71 return ::DeleteFile(ToUtf16(filename.pathname()).c_str()) != 0;
73 } 72 }
74 73
75 bool Win32Filesystem::GetTemporaryFolder(Pathname &pathname, bool create, 74 bool Win32Filesystem::GetTemporaryFolder(Pathname &pathname, bool create,
76 const std::string *append) { 75 const std::string *append) {
77 wchar_t buffer[MAX_PATH + 1]; 76 wchar_t buffer[MAX_PATH + 1];
78 if (!::GetTempPath(arraysize(buffer), buffer)) 77 if (!::GetTempPath(arraysize(buffer), buffer))
79 return false; 78 return false;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 bool Win32Filesystem::GetFileSize(const Pathname &pathname, size_t *size) { 145 bool Win32Filesystem::GetFileSize(const Pathname &pathname, size_t *size) {
147 WIN32_FILE_ATTRIBUTE_DATA data = {0}; 146 WIN32_FILE_ATTRIBUTE_DATA data = {0};
148 if (::GetFileAttributesEx(ToUtf16(pathname.pathname()).c_str(), 147 if (::GetFileAttributesEx(ToUtf16(pathname.pathname()).c_str(),
149 GetFileExInfoStandard, &data) == 0) 148 GetFileExInfoStandard, &data) == 0)
150 return false; 149 return false;
151 *size = data.nFileSizeLow; 150 *size = data.nFileSizeLow;
152 return true; 151 return true;
153 } 152 }
154 153
155 } // namespace rtc 154 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/unixfilesystem.cc ('k') | webrtc/sdk/android/api/org/webrtc/CallSessionFileRotatingLogSink.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698