Flutter Engine
The 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
13namespace fml {
14namespace paths {
15
16std::pair<bool, std::string> GetExecutablePath();
17std::pair<bool, std::string> GetExecutableDirectoryPath();
18
19// Get the directory to the application's caches directory.
21
22std::string JoinPaths(std::initializer_list<std::string> components);
23
24// Returns the absolute path of a possibly relative path.
25// It doesn't consult the filesystem or simplify the path.
26std::string AbsolutePath(const std::string& path);
27
28// Returns the directory name component of the given path.
29std::string GetDirectoryName(const std::string& path);
30
31// Decodes a URI encoded string.
32std::string SanitizeURIEscapedCharacters(const std::string& str);
33
34// Converts a file URI to a path.
35std::string FromURI(const std::string& uri);
36
37} // namespace paths
38} // namespace fml
39
40#endif // FLUTTER_FML_PATHS_H_
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
std::string JoinPaths(std::initializer_list< std::string > components)
Definition: paths.cc:14
std::pair< bool, std::string > GetExecutablePath()
std::string AbsolutePath(const std::string &path)
Definition: paths_posix.cc:29
fml::UniqueFD GetCachesDirectory()
std::pair< bool, std::string > GetExecutableDirectoryPath()
Definition: paths.cc:55
std::string SanitizeURIEscapedCharacters(const std::string &str)
Definition: paths.cc:32
std::string GetDirectoryName(const std::string &path)
Definition: paths_posix.cc:42
std::string FromURI(const std::string &uri)
Definition: paths_posix.cc:53
Definition: ascii_trie.cc:9