| OLD | NEW |
| 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 |
| 11 #ifndef _WEBRTC_BASE_WIN32FILESYSTEM_H__ | 11 #ifndef _WEBRTC_BASE_WIN32FILESYSTEM_H__ |
| 12 #define _WEBRTC_BASE_WIN32FILESYSTEM_H__ | 12 #define _WEBRTC_BASE_WIN32FILESYSTEM_H__ |
| 13 | 13 |
| 14 #include "fileutils.h" | 14 #include "fileutils.h" |
| 15 | 15 |
| 16 namespace rtc { | 16 namespace rtc { |
| 17 | 17 |
| 18 class Win32Filesystem : public FilesystemInterface { | 18 class Win32Filesystem : public FilesystemInterface { |
| 19 public: | 19 public: |
| 20 // Opens a file. Returns an open StreamInterface if function succeeds. | |
| 21 // Otherwise, returns null. | |
| 22 virtual FileStream *OpenFile(const Pathname &filename, | |
| 23 const std::string &mode); | |
| 24 | |
| 25 // This will attempt to delete the path located at filename. | 20 // This will attempt to delete the path located at filename. |
| 26 // If the path points to a folder, it will fail with VERIFY | 21 // If the path points to a folder, it will fail with VERIFY |
| 27 virtual bool DeleteFile(const Pathname &filename); | 22 virtual bool DeleteFile(const Pathname &filename); |
| 28 | 23 |
| 29 // This will attempt to delete an empty folder. If the path does not point to | 24 // This will attempt to delete an empty folder. If the path does not point to |
| 30 // a folder, it fails with VERIFY. If the folder is not empty, it fails normal
ly | 25 // a folder, it fails with VERIFY. If the folder is not empty, it fails normal
ly |
| 31 virtual bool DeleteEmptyFolder(const Pathname &folder); | 26 virtual bool DeleteEmptyFolder(const Pathname &folder); |
| 32 | 27 |
| 33 // Creates a directory. This will call itself recursively to create /foo/bar e
ven if | 28 // Creates a directory. This will call itself recursively to create /foo/bar e
ven if |
| 34 // /foo does not exist. | 29 // /foo does not exist. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const std::string *append); | 63 const std::string *append); |
| 69 | 64 |
| 70 private: | 65 private: |
| 71 // Returns the path to the running application. | 66 // Returns the path to the running application. |
| 72 bool GetAppPathname(Pathname* path); | 67 bool GetAppPathname(Pathname* path); |
| 73 }; | 68 }; |
| 74 | 69 |
| 75 } // namespace rtc | 70 } // namespace rtc |
| 76 | 71 |
| 77 #endif // WEBRTC_WINFILESYSTEM_H__ | 72 #endif // WEBRTC_WINFILESYSTEM_H__ |
| OLD | NEW |