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

Unified Diff: webrtc/base/file.h

Issue 2877023002: Move webrtc/{base => rtc_base} (Closed)
Patch Set: update presubmit.py and DEPS include rules 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/base/fakesslidentity.h ('k') | webrtc/base/file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/file.h
diff --git a/webrtc/base/file.h b/webrtc/base/file.h
index f4806d1a02bd569ed0c181f944603851e57ecca9..5a4465f6ac813789e613e876e5634f3774dc22a2 100644
--- a/webrtc/base/file.h
+++ b/webrtc/base/file.h
@@ -11,72 +11,9 @@
#ifndef WEBRTC_BASE_FILE_H_
#define WEBRTC_BASE_FILE_H_
-#include <stdint.h>
-#include <string>
-
-#include "webrtc/base/constructormagic.h"
-#include "webrtc/base/pathutils.h"
-#include "webrtc/base/platform_file.h"
-
-namespace rtc {
-
-// This class wraps the platform specific APIs for simple file interactions.
-//
-// The various read and write methods are best effort, i.e. if an underlying
-// call does not manage to read/write all the data more calls will be performed,
-// until an error is detected or all data is read/written.
-class File {
- public:
- // Wraps the given PlatformFile. This class is then responsible for closing
- // the file, which will be done in the destructor if Close is never called.
- explicit File(PlatformFile);
- // The default constructor produces a closed file.
- File();
- ~File();
-
- File(File&& other);
- File& operator=(File&& other);
-
- // Open and Create give files with both reading and writing enabled.
- static File Open(const std::string& path);
- static File Open(Pathname&& path);
- static File Open(const Pathname& path);
- // If the file already exists it will be overwritten.
- static File Create(const std::string& path);
- static File Create(Pathname&& path);
- static File Create(const Pathname& path);
-
- // Remove a file in the file system.
- static bool Remove(const std::string& path);
- static bool Remove(Pathname&& path);
- static bool Remove(const Pathname& path);
-
- size_t Write(const uint8_t* data, size_t length);
- size_t Read(uint8_t* buffer, size_t length);
-
- // The current position in the file after a call to these methods is platform
- // dependent (MSVC gives position offset+length, most other
- // compilers/platforms do not alter the position), i.e. do not depend on it,
- // do a Seek before any subsequent Read/Write.
- size_t WriteAt(const uint8_t* data, size_t length, size_t offset);
- size_t ReadAt(uint8_t* buffer, size_t length, size_t offset);
-
- // Attempt to position the file at the given offset from the start.
- // Returns true if successful, false otherwise.
- bool Seek(size_t offset);
-
- // Attempt to close the file. Returns true if successful, false otherwise,
- // most notably when the file is already closed.
- bool Close();
-
- bool IsOpen();
-
- private:
- PlatformFile file_;
- RTC_DISALLOW_COPY_AND_ASSIGN(File);
-};
-
-} // namespace rtc
+// This header is deprecated and is just left here temporarily during
+// refactoring. See https://bugs.webrtc.org/7634 for more details.
+#include "webrtc/rtc_base/file.h"
#endif // WEBRTC_BASE_FILE_H_
« no previous file with comments | « webrtc/base/fakesslidentity.h ('k') | webrtc/base/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698