OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 TOOLS_GN_FILESYSTEM_UTILS_H_ | 5 #ifndef TOOLS_GN_FILESYSTEM_UTILS_H_ |
6 #define TOOLS_GN_FILESYSTEM_UTILS_H_ | 6 #define TOOLS_GN_FILESYSTEM_UTILS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
14 #include "tools/gn/settings.h" | 14 #include "tools/gn/settings.h" |
15 #include "tools/gn/target.h" | 15 #include "tools/gn/target.h" |
16 | 16 |
17 class Err; | 17 class Err; |
18 class Location; | |
19 class Value; | |
20 | 18 |
21 std::string FilePathToUTF8(const base::FilePath::StringType& str); | 19 std::string FilePathToUTF8(const base::FilePath::StringType& str); |
22 inline std::string FilePathToUTF8(const base::FilePath& path) { | 20 inline std::string FilePathToUTF8(const base::FilePath& path) { |
23 return FilePathToUTF8(path.value()); | 21 return FilePathToUTF8(path.value()); |
24 } | 22 } |
25 base::FilePath UTF8ToFilePath(const base::StringPiece& sp); | 23 base::FilePath UTF8ToFilePath(const base::StringPiece& sp); |
26 | 24 |
27 // Extensions ----------------------------------------------------------------- | 25 // Extensions ----------------------------------------------------------------- |
28 | 26 |
29 // Returns the index of the extension (character after the last dot not after a | 27 // Returns the index of the extension (character after the last dot not after a |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 OutputFile GetBuildDirForTargetAsOutputFile(const Target* target, | 260 OutputFile GetBuildDirForTargetAsOutputFile(const Target* target, |
263 BuildDirType type); | 261 BuildDirType type); |
264 | 262 |
265 // Returns the scope's current directory. | 263 // Returns the scope's current directory. |
266 SourceDir GetScopeCurrentBuildDirAsSourceDir(const Scope* scope, | 264 SourceDir GetScopeCurrentBuildDirAsSourceDir(const Scope* scope, |
267 BuildDirType type); | 265 BuildDirType type); |
268 // Lack of OutputDir version is due only to it not currently being needed, | 266 // Lack of OutputDir version is due only to it not currently being needed, |
269 // please add one if you need it. | 267 // please add one if you need it. |
270 | 268 |
271 #endif // TOOLS_GN_FILESYSTEM_UTILS_H_ | 269 #endif // TOOLS_GN_FILESYSTEM_UTILS_H_ |
OLD | NEW |