OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_SCOPED_TEMP_DIR_H_ | 5 #ifndef BASE_MEMORY_SCOPED_TEMP_DIR_H_ |
6 #define BASE_SCOPED_TEMP_DIR_H_ | 6 #define BASE_MEMORY_SCOPED_TEMP_DIR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // An object representing a temporary / scratch directory that should be cleaned | 9 // An object representing a temporary / scratch directory that should be cleaned |
10 // up (recursively) when this object goes out of scope. Note that since | 10 // up (recursively) when this object goes out of scope. Note that since |
11 // deletion occurs during the destructor, no further error handling is possible | 11 // deletion occurs during the destructor, no further error handling is possible |
12 // if the directory fails to be deleted. As a result, deletion is not | 12 // if the directory fails to be deleted. As a result, deletion is not |
13 // guaranteed by this class. | 13 // guaranteed by this class. |
14 // | 14 // |
15 // Multiple calls to the methods which establish a temporary directory | 15 // Multiple calls to the methods which establish a temporary directory |
16 // (CreateUniqueTempDir, CreateUniqueTempDirUnderPath, and Set) must have | 16 // (CreateUniqueTempDir, CreateUniqueTempDirUnderPath, and Set) must have |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 // Returns true if path_ is non-empty and exists. | 49 // Returns true if path_ is non-empty and exists. |
50 bool IsValid() const; | 50 bool IsValid() const; |
51 | 51 |
52 private: | 52 private: |
53 FilePath path_; | 53 FilePath path_; |
54 | 54 |
55 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir); | 55 DISALLOW_COPY_AND_ASSIGN(ScopedTempDir); |
56 }; | 56 }; |
57 | 57 |
58 #endif // BASE_SCOPED_TEMP_DIR_H_ | 58 #endif // BASE_MEMORY_SCOPED_TEMP_DIR_H_ |
OLD | NEW |