Flutter Engine
paths.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_FML_PATHS_H_
6 #define FLUTTER_FML_PATHS_H_
7 
8 #include <string>
9 #include <utility>
10 
11 #include "flutter/fml/unique_fd.h"
12 
13 namespace fml {
14 namespace paths {
15 
16 std::pair<bool, std::string> GetExecutableDirectoryPath();
17 
18 // Get the directory to the application's caches directory.
20 
21 std::string JoinPaths(std::initializer_list<std::string> components);
22 
23 // Returns the absolute path of a possibly relative path.
24 // It doesn't consult the filesystem or simplify the path.
25 std::string AbsolutePath(const std::string& path);
26 
27 // Returns the directory name component of the given path.
28 std::string GetDirectoryName(const std::string& path);
29 
30 // Decodes a URI encoded string.
31 std::string SanitizeURIEscapedCharacters(const std::string& str);
32 
33 // Converts a file URI to a path.
34 std::string FromURI(const std::string& uri);
35 
36 } // namespace paths
37 } // namespace fml
38 
39 #endif // FLUTTER_FML_PATHS_H_
DEF_SWITCHES_START snapshot asset path
Definition: switches.h:32
std::string SanitizeURIEscapedCharacters(const std::string &str)
Definition: paths.cc:32
fml::UniqueFD GetCachesDirectory()
Definition: ascii_trie.cc:9
std::string AbsolutePath(const std::string &path)
Definition: paths_posix.cc:29
std::string GetDirectoryName(const std::string &path)
Definition: paths_posix.cc:42
std::pair< bool, std::string > GetExecutableDirectoryPath()
std::string FromURI(const std::string &uri)
Definition: paths_posix.cc:53
std::string JoinPaths(std::initializer_list< std::string > components)
Definition: paths.cc:14