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

Side by Side Diff: webrtc/base/unixfilesystem.h

Issue 2894583002: Delete Filesystem::IterateDirectory and Filesystem::OpenFile. (Closed)
Patch Set: Check stream.Open return value. Created 3 years, 7 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
« no previous file with comments | « webrtc/base/fileutils_unittest.cc ('k') | webrtc/base/unixfilesystem.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 // folders. That needs to be passed into this class from Java. Similarly, iOS 27 // folders. That needs to be passed into this class from Java. Similarly, iOS
28 // only supports an Objective-C API for fetching the folder locations, so that 28 // only supports an Objective-C API for fetching the folder locations, so that
29 // needs to be passed in here from Objective-C. Or at least that used to be 29 // needs to be passed in here from Objective-C. Or at least that used to be
30 // the case; now the ctor will do the work if necessary and possible. 30 // the case; now the ctor will do the work if necessary and possible.
31 // TODO(fischman): add an Android version that uses JNI and drop the 31 // TODO(fischman): add an Android version that uses JNI and drop the
32 // SetApp*Folder() APIs once external users stop using them. 32 // SetApp*Folder() APIs once external users stop using them.
33 static void SetAppDataFolder(const std::string& folder); 33 static void SetAppDataFolder(const std::string& folder);
34 static void SetAppTempFolder(const std::string& folder); 34 static void SetAppTempFolder(const std::string& folder);
35 #endif 35 #endif
36 36
37 // Opens a file. Returns an open StreamInterface if function succeeds.
38 // Otherwise, returns null.
39 FileStream* OpenFile(const Pathname& filename,
40 const std::string& mode) override;
41
42 // This will attempt to delete the file located at filename. 37 // This will attempt to delete the file located at filename.
43 // It will fail with VERIY if you pass it a non-existant file, or a directory. 38 // It will fail with VERIY if you pass it a non-existant file, or a directory.
44 bool DeleteFile(const Pathname& filename) override; 39 bool DeleteFile(const Pathname& filename) override;
45 40
46 // This will attempt to delete the folder located at 'folder' 41 // This will attempt to delete the folder located at 'folder'
47 // It DCHECKs and returns false if you pass it a non-existant folder or a 42 // It DCHECKs and returns false if you pass it a non-existant folder or a
48 // plain file. 43 // plain file.
49 bool DeleteEmptyFolder(const Pathname& folder) override; 44 bool DeleteEmptyFolder(const Pathname& folder) override;
50 45
51 // Creates a directory. This will call itself recursively to create /foo/bar 46 // Creates a directory. This will call itself recursively to create /foo/bar
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 #else 88 #else
94 static char* app_temp_path_; 89 static char* app_temp_path_;
95 #endif 90 #endif
96 91
97 static char* CopyString(const std::string& str); 92 static char* CopyString(const std::string& str);
98 }; 93 };
99 94
100 } // namespace rtc 95 } // namespace rtc
101 96
102 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_ 97 #endif // WEBRTC_BASE_UNIXFILESYSTEM_H_
OLDNEW
« no previous file with comments | « webrtc/base/fileutils_unittest.cc ('k') | webrtc/base/unixfilesystem.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698