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/platform_file.h" | 26 #include "webrtc/base/platform_file.h" |
27 #include "webrtc/base/scoped_ptr.h" | |
28 | 27 |
29 namespace rtc { | 28 namespace rtc { |
30 | 29 |
31 class FileStream; | 30 class FileStream; |
32 class Pathname; | 31 class Pathname; |
33 | 32 |
34 ////////////////////////// | 33 ////////////////////////// |
35 // Directory Iterator // | 34 // Directory Iterator // |
36 ////////////////////////// | 35 ////////////////////////// |
37 | 36 |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 // is specified, it uses the temporary directory. If a filename is provided, | 426 // is specified, it uses the temporary directory. If a filename is provided, |
428 // up to 100 variations of form basename-N.extension are tried. When | 427 // up to 100 variations of form basename-N.extension are tried. When |
429 // create_empty is true, an empty file of this name is created (which | 428 // create_empty is true, an empty file of this name is created (which |
430 // decreases the chance of a temporary filename collision with another | 429 // decreases the chance of a temporary filename collision with another |
431 // process). | 430 // process). |
432 bool CreateUniqueFile(Pathname& path, bool create_empty); | 431 bool CreateUniqueFile(Pathname& path, bool create_empty); |
433 | 432 |
434 } // namespace rtc | 433 } // namespace rtc |
435 | 434 |
436 #endif // WEBRTC_BASE_FILEUTILS_H_ | 435 #endif // WEBRTC_BASE_FILEUTILS_H_ |
OLD | NEW |