| 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_FILEUTILS_H_ | 11 #ifndef WEBRTC_BASE_FILEUTILS_H_ |
| 12 #define WEBRTC_BASE_FILEUTILS_H_ | 12 #define WEBRTC_BASE_FILEUTILS_H_ |
| 13 | 13 |
| 14 #include <string> | 14 #include <string> |
| 15 | 15 |
| 16 #if !defined(WEBRTC_WIN) | 16 #if !defined(WEBRTC_WIN) |
| 17 #include <dirent.h> | 17 #include <dirent.h> |
| 18 #include <stdio.h> | 18 #include <stdio.h> |
| 19 #include <sys/stat.h> | 19 #include <sys/stat.h> |
| 20 #include <sys/types.h> | 20 #include <sys/types.h> |
| 21 #include <unistd.h> | 21 #include <unistd.h> |
| 22 #endif | 22 #endif |
| 23 | 23 |
| 24 #include "webrtc/base/basictypes.h" | 24 #include "webrtc/base/basictypes.h" |
| 25 #include "webrtc/base/common.h" | 25 #include "webrtc/base/common.h" |
| 26 #include "webrtc/base/constructormagic.h" |
| 26 #include "webrtc/base/platform_file.h" | 27 #include "webrtc/base/platform_file.h" |
| 27 | 28 |
| 28 namespace rtc { | 29 namespace rtc { |
| 29 | 30 |
| 30 class FileStream; | 31 class FileStream; |
| 31 class Pathname; | 32 class Pathname; |
| 32 | 33 |
| 33 ////////////////////////// | 34 ////////////////////////// |
| 34 // Directory Iterator // | 35 // Directory Iterator // |
| 35 ////////////////////////// | 36 ////////////////////////// |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 // is specified, it uses the temporary directory. If a filename is provided, | 427 // is specified, it uses the temporary directory. If a filename is provided, |
| 427 // up to 100 variations of form basename-N.extension are tried. When | 428 // up to 100 variations of form basename-N.extension are tried. When |
| 428 // create_empty is true, an empty file of this name is created (which | 429 // create_empty is true, an empty file of this name is created (which |
| 429 // decreases the chance of a temporary filename collision with another | 430 // decreases the chance of a temporary filename collision with another |
| 430 // process). | 431 // process). |
| 431 bool CreateUniqueFile(Pathname& path, bool create_empty); | 432 bool CreateUniqueFile(Pathname& path, bool create_empty); |
| 432 | 433 |
| 433 } // namespace rtc | 434 } // namespace rtc |
| 434 | 435 |
| 435 #endif // WEBRTC_BASE_FILEUTILS_H_ | 436 #endif // WEBRTC_BASE_FILEUTILS_H_ |
| OLD | NEW |